You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
View Demo
Task: to allow users to edit a specialized question and set its default value at design time, however, disable the question in preview.
I thought that I can use the question.isDesignMode setting to check whether or not a question is in design mode. However, the question.isDesignMode returns false within the onCreated, onLoaded, onAfterRender functions. The question.isDesignMode only returns true in onAfterRenderQuestion event for the first time. When you click the Default Value editor, the isDesignMode again returns false.
Therefore, I cannot conditionally enable or disable a specialized question type using the ICustomQuestionTypeConfiguration and Question API. As an option, I can enable the readOnly option when a SurveyModel is initialized.
T19649 - Custom components, in read-only mode, I cannot set default values.
https://surveyjs.answerdesk.io/internal/ticket/details/T19649
View Demo
Task: to allow users to edit a specialized question and set its default value at design time, however, disable the question in preview.
I thought that I can use the
question.isDesignMode
setting to check whether or not a question is in design mode. However, thequestion.isDesignMode
returnsfalse
within theonCreated
,onLoaded
,onAfterRender
functions. Thequestion.isDesignMode
only returnstrue
inonAfterRenderQuestion
event for the first time. When you click the Default Value editor, theisDesignMode
again returns false.Therefore, I cannot conditionally enable or disable a specialized question type using the
ICustomQuestionTypeConfiguration
and Question API. As an option, I can enable thereadOnly
option when a SurveyModel is initialized.However, I though that I would implement the required business logic at the level of my custom component.
The text was updated successfully, but these errors were encountered: