Question T9429
Visible to All Users

Refresh/Update Survey component

created 3 years ago

Hi,

At the moment I am pushing data to the model.data element and the data is there and working fine. However, I have to go to the next page and click back to previous page for the text to be visible. I am using a custom widget so I assume that is why, but is there a handler or event call I can get to refresh the component?

I have checked it works fine on normal SurveyJS question types like one line input, but not my custom widget.

A work around I guess would be to programically go to next page and back to the current page right?

Thanks

Answers approved by surveyjs Support

created 3 years ago

Hello,
Please create a plunker or CodeSandbox example, we will take a look. You should not "refresh" a widget.
It is very likely, that you do not have code, when the survey has the data for this question and you do not set it on it's creation in afterRender.

Thank you,
Andrew
SurveyJS Team

    Comments (2)

      Hi, I am doing something very similar to this.

      https://plnkr.co/edit/Pg7d4SQKlroMY8jU

      But this is with a custom widget of rich text, like ckEditor, AND it is working using this method for the built in components from SurveyJS, but not my custom component.

      Thanks

      PS: all the nessessary components are momoized and supervised with dispatch, therefore data is updating correctly. When i log the data and survey.JSON all is there, just the DOM doesn't show it. Only works when i click Next Page and go Back to previous page

        You are probably gave me a wrong link. It contains a survey with four boolean questions.

        Thank you,
        Andrew
        SurveyJS Team