Skip to content
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

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

Open
andrewtelnov opened this issue Aug 7, 2024 · 1 comment
Assignees
Labels
question user issue An issue or bug reported by users.

Comments

@andrewtelnov
Copy link
Member

andrewtelnov commented Aug 7, 2024

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 andrewtelnov added bug user issue An issue or bug reported by users. labels Aug 7, 2024
@andrewtelnov andrewtelnov self-assigned this Aug 7, 2024
@andrewtelnov andrewtelnov added question and removed bug labels Aug 7, 2024
@andrewtelnov
Copy link
Member Author

andrewtelnov commented Aug 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question user issue An issue or bug reported by users.
Projects
None yet
Development

No branches or pull requests

1 participant