-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckboxInputOptions stores values from all checkbox questions #45
Comments
Do any of your question IDs match across your config? If this is the case, it will cause issues. |
I can confirm this issue. Essentially, all selected values from the panel 1 are carried over to the next multi choice panel. And, even if I uncheck a value in the panel 1, the value is still carried over to the next panel. An Example would be, Panel 1 has only one question Q1 with [a, b, c, d], and Panel 2 has only one question Q2 with [e, f, g, h, i, g]. Click a, b, c, then uncheck c. Q2 has [a, b]. After switching to Panel 2, click e, g. Now Q2 has [a, b, c, e, g]. And sometimes, Q1 will have all Q2's choices, too. |
I ended up finding a solution to my issue. |
Thanks a lot. I was looking at the same line, too. Your changes did fix it by cloning the array so that it won't change the original props.value array. It's not a problem with other types of input because others are not objects. |
Appreciate finding the issue and yes, the clone is what will fix this. I'll have to find some time to work in a fix, or maybe this can be pull requested. :) |
Fixed in latest version (coming today). |
I am having an issue that when I have numerous questions that use the input type checkboxOptionsInput the checked answers are added the state including one from previous questions, thereby causing the answer to include all checked boxes from all of the different questions that use an checkboxOptionsInput.
I think it might be due to the fact that the constructor set the state to the props.value and when the state is updated it also resets the props.value.
The text was updated successfully, but these errors were encountered: