survey-creator icon indicating copy to clipboard operation
survey-creator copied to clipboard

Custom property editor doesn't work as expected in the itemvalue property editor (matrix)

Open andrewtelnov opened this issue 1 year ago • 1 comments

The following code doens't work correctly. It displays strange text in the cell.

const itemValueCommentType = 'itemValueCommentType';
SurveyCreatorCore.PropertyGridEditorCollection.register({
  fit: function (prop) {
    return prop.type === itemValueCommentType;
  },
  getJSON: function (obj, prop, options) {
    return {
      type: 'boolean',
      renderAs: 'checkbox',
    };
  },
});

Survey.Serializer.addProperty('itemvalue', {
      name: 'o_comment',
      type: itemValueCommentType,
      default: false,
    });

Here is the example.

andrewtelnov avatar Aug 07 '24 07:08 andrewtelnov

I have removed displayName: '', and it works now.

andrewtelnov avatar Aug 07 '24 10:08 andrewtelnov