Skip to content
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

fix: selected state after loading from localStorage #1785

Closed
wants to merge 1 commit into from

Conversation

Chartman123
Copy link
Collaborator

This fixes #1780

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
@Chartman123 Chartman123 added 3. to review Waiting for reviews regression Regression of a previous working feature feature: 📝 submitting responses labels Nov 20, 2023
@Chartman123 Chartman123 added this to the 3.4 milestone Nov 20, 2023
@Chartman123 Chartman123 self-assigned this Nov 20, 2023
@susnux
Copy link
Collaborator

susnux commented Nov 21, 2023

What is the difference except from making is not reactive anymore?
Currently onChange is called which already should update the values in the submit view which then should propagade back through the props to the question.
This create a copy of the value and drops the reactivity as the values are never loaded back from the props if changed after mount.

@susnux
Copy link
Collaborator

susnux commented Nov 21, 2023

Well I see why this is working: The question was never updated from Submit as the answers object in Submit is not reactive and thus the changed answers were not updated back on the question -> UI seems to be stuck.

This fixes it by creating a local copy of the values, but therefor loose any reactivity.

@Chartman123 Chartman123 deleted the fix/load-from-localstorage branch November 21, 2023 09:19
@Chartman123 Chartman123 removed the 3. to review Waiting for reviews label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: 📝 submitting responses regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkboxes/Radio buttons don't update in UI if values are loaded from LocalStorage
2 participants