Open dipen211 opened 2 years ago
It's too late to update question settings after question has been reldered. You need to do it in the https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#onQuestionAdded event handler. Here is the updated codesandbox - https://codesandbox.io/s/bitter-architecture-enj2l?file=/src/components/checkboxbutton.js
and what about this buttons..??
this button are also not working
This is due to some uissues with styles. We'll fix them.
As a workaround I've updated your example - https://codesandbox.io/s/bitter-architecture-enj2l?file=/src/components/SurveyCreator.js
I've checked our change history.
The
.svc-widget__content {
.sd-question__content {
pointer-events: none;
}
}
rule was added in order to disable interactivity for the custom widgets on design surface. In general case we don't know what is being rendered in a custom widget content and how to control it design-time mode, and we decided to cover the whole widget content via non-interactive element. Yes, we understand that it's not an ideal solution. But otherwise we should re-write all custom widgets to support creator design time behavior. At this moment we postponed this work.
In your case (if you are using original rendering) you get choice item adorners that are not interactive due to this rule. At this moment we recommend to solve it via CSS override:
.svc-widget__content .sd-question__content {
pointer-events: all;
}
as shown in this example - https://codesandbox.io/s/bitter-architecture-enj2l?file=/src/components/SurveyCreator.js
Probably existing custom widgets concept: cross-platfom widget rendering in the onAfterRender event handler has an abstraction leak in the Creator V2. We need to discuss the following alternatives: component rendering override, "renderAs" option and new native questions registration for custom widgets @andrewtelnov @dmitrykurmanov @novikov82 what do you think?
This also affects custom widgets using radiogroups and dropdown. Radiogroup have the exact same behaviours with the disabled pointer events, but dropdown are missing tho whole item list from the creator.
Minimal reproduce: https://plnkr.co/edit/nRrGonrMOXhFFooO
Thank you for your previous solution @tsv2013
now with the latest version I have a new issue with this Now I am not able to get select all, none, and other button with the green plus icon in the UI
this image is with an old version of Surveyjs packages.
Identify my issue and help me to solve this. Thank You,
Added custom widget for checkbox question I change the choice of checkbox...
when i select question from question list it display it's default value like this
when i click on preview button or any other part on page then it display as per my choice...
also + and - icon are not working for this widget
codesandbox link:- https://codesandbox.io/s/smoosh-star-j4x6v