surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.21k stars 814 forks source link

`defaultValue` doesn't trigger conditional visibility when `questionsOnPageMode` is `"questionPerPage"` #7932

Closed letitechera closed 8 months ago

letitechera commented 8 months ago

Reporting a bug

I recently updated surveyjs from v1.9.116 to v1.9.132 and the behavior for some of my panel questions broke.

The expected behavior should be that the first question in my panel, which is a radiogroup question, should have a defaultValue, if that value is selected then I show the text input from the next question in the panel. Since it's the default value, the input should be shown on survey load by default. But now it is not! I have to choose another option and then select that option again for the text input to show.

This was working in v1.9.116 as expected. But it broke after updating to v1.9.132. (It is impacting the business of the company I work for).

Here is a codesandbox with the example to reproduce the error: codesandbox (I added multiple panel questions to show it, because sometimes it doesn't happen to the first one)

andrewtelnov commented 8 months ago

@letitechera Your code sandbox is likely private.

UPDATED: Here is a small working example. Feel free to fork it, modify it and post a new link here that reproduces the issue.

Thank you, Andrew

letitechera commented 8 months ago

@andrewtelnov Sorry about that, just made it public, try accessing the link again

andrewtelnov commented 8 months ago

@letitechera Here is the small reproducible example. As a current work-around, you can comment questionsOnPageMode: "questionPerPage" in JSON and set this property after loading model. We will take a look and comeback to you.

Thank you, Andrew