surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
911 stars 373 forks source link

[V2] Custom radiogroup component shows adorner choice editing #3372

Closed SamMousa closed 2 years ago

SamMousa commented 2 years ago

Are you requesting a feature, reporting a bug or ask a question?

Bug

PS. I worked on this bug before, but can not find it anymore... maybe I never submitted it, maybe I did and this is a duplicate.. If that's the case, apologies!

What is the current behavior?

Creator V2 still shows the adorner allowing editing of choices when it hides the choices in the property grid.

What is the expected behavior?

They should be in sync; if a custom component defines choices and the property grid thus decides to hide this configuration option, the visual editor also should not allow editing choices

How would you reproduce the current behavior (if this is a bug)?

I've provided a plunker.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/plunk/SBDqEw9WNCZlwQD4

Specify your

JaneSjs commented 2 years ago

Hi @SamMousa, Thank you for reporting this issue. We'll work on it.

tsv2013 commented 2 years ago

In general if you hide some option in property grid id doesn't mean you want to make it read only. @andrewtelnov What do you think about it?

SamMousa commented 2 years ago

That's if I hide it. But if You hide it, because it doesn't work in combination with choices from url for example, it does make sense :)

andrewtelnov commented 2 years ago

@tsv2013 The idea of creating the component is hide the complexity. IMHO, in this case, country component, user should not see any adorners inside the component. End user can drop the component and modify properties related to base question.

Thank you, Andrew

tsv2013 commented 2 years ago

Fixed via the https://github.com/surveyjs/survey-library/commit/bad58e11d1c461bbb7b6fc5f12be6cd2a132644e commit in library