Issue T15490
Visible to All Users

Render Infinite Loop when I set cascading dropdowns with choicesByUrl

created a year ago (modified a year ago)

Hi,

In the following example I tried to reproduce the case that on our production environment causes web page to lock forever (browser warns that javascript is blocking navigation asking to block it or keep waiting). Since the following example is built in development mode, it generates a warning of a possible render infinite loop (if you don't see the warning in the browser console, open the codesandbox console): in production mode it causes the lock of the web page (and the survey does not appear properly rendered, too).

The case is simple: we have three dropdown questions that take choices from url; the second url has a parameter from the first question and the third has a parameter from the second. I used a sample jsonplaceholder url since I cannot expose my REST apis. The second and third question are visible if previous questions are filled. Their values are cleared if something changes in the previous question: I tried to implement this logic with resetValueIf properties.

Now, if I press the little button "set data", you view on top, some data are assigned to survey and you will see the warning. In production mode no warnings or errors appear in console but the web page locks and the user is asked to block javascript: when I interrupt the execution only the first dropdown has been filled with data, the others remaining empty.

Do you know what could be the cause of this problem and how can I solve it?

Here the sample code (with same libraries versions used in our production environment).

https://codesandbox.io/embed/surveyjs-add-a-survey-to-a-vue-application-forked-52fddd?fontsize=14&hidenavigation=1&theme=dark

Thank you

Comments (1)

    Hello,
    Thank you for sharing a demo.
    I tested your demo on my end and reproduced the following warning:

    Code
    index.js:27 [Vue warn]: You may have an infinite update loop in a component render function. found in ---> <DropdownComponent> at src/vue/components/dropdown/dropdown.vue <Dropdown> at src/vue/dropdown.vue <SurveyElementVue> at src/vue/element.vue <SurveyRowElement> at src/vue/row-element.vue <Row> at src/vue/row.vue <Page> at src/vue/page.vue <Survey> at src/vue/survey.vue <MyFirstSurvey> at /src/components/MyFirstSurvey.vue <App> at /src/App.vue <Root>

    I will forward this issue to our developers for further investigation: Dependent Dropdown questions - View Warning: You may have an infinite update loop in a component render function.

    We'll update you as soon as we get any news to share.

    Thank you

    Answers approved by surveyjs Support

    created a year ago

    Hello,
    We have fixed this issue. The fix will be included into the upcoming maintenance update expected in a day or so.

    Thank you

      Comments (2)

        Thank you very much for the quick fix

          You're very welcome! Please feel free to contact us if you have any further questions.

          Thanks