Closed JaneSjs closed 9 months ago
Here is the correct code and the working example:
const customProp = {
name: "customProp",
category: "general"
};
const columnCustomProp = {
name: customProp.name,
category: customProp.category,
onGetValue: function (obj) {
return obj.templateQuestion[customProp.name];
},
onSetValue: function (obj, value) {
obj.templateQuestion[customProp.name] = value;
}
}
Serializer.addProperty("question", customProp);
Serializer.addProperty("matrixdropdowncolumn", columnCustomProp);
SurveyQuestionEditorDefinition.definition[
"matrixdropdowncolumn@default"
].properties.push(customProp.name);
User Issue: T16184 - Custom property for Dynamic Matrix Column https://surveyjs.answerdesk.io/internal/ticket/details/T16184
View Demo If you register a custom property for a
matrixdropdowncolumn
,question
, anddropdown
, the custom property value doesn't appear for a matrix column.Expected behavior: the custom property for matrix columns display values defined within a survey JSON.