-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix dynamic in property grid rendered incorrectly #6615
Comments
@SamMousa It is better to inherited from Thank you, |
I'll describe the full feature (in hopes you want to mainstream it ;-))
Example, I have pages p1 - p10. Page 10 also has randomization group R1. Before the survey start I create a list of spots:
Note that within blocks I do the same logic for randomization groups so pages within a block could also be randomized. Anyway, to support this in a user friendly way I have added a
Now I need to set up the creator so the property grid supports this properly. I'd expect to be able to set that up like this: PropertyGridEditorCollection.register({
fit(prop) {
if (['blockitemvalue[]'].includes(prop.type)) {
return true;
}
return false;
},
createPropertyEditorSetup: () => {
// This is actually not used
return {
editSurvey: {} as SurveyModel,
apply: () => false
};
},
showModalPropertyEditor: (_editor, _property) => {
// This is actually not used
return {
editSurvey: {} as SurveyModel,
apply: () => false
};
},
isPropertyEditorSetupEnabled() {
return false;
},
getJSON() {
return {
type: 'matrixdynamic',
columns: [
{
name: 'value'
},
{
name: 'randomizationGroup'
}
],
rowCount: 0,
cellType: 'text'
};
}
}); I'd rather not inherit from third party code, it's a brittle approach, further more, above is the documented way of setting op property grid editors right? |
Describe the bug
I'm rendering a matrix dynamic question inside the property grid, but it renders incorrectly:
Steps to reproduce
See https://plnkr.co/edit/smcxH7T8pxw0IqSw
Expected behavior
I'd expect to be able to use a
matrixdynamic
question.Screenshots
Please complete the following information:
Additional context
The text was updated successfully, but these errors were encountered: