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 the "More" Modal Pushing Data up and Down #3868

Merged
merged 4 commits into from
Jun 20, 2024
Merged

Conversation

ShadeWyrm
Copy link
Contributor

Fixes #3867

Learning :

Fully uncontrolled — in this case your custom would take defaultChecked as a prop, and pass it to DOM . The state would be inside the component itself. The prop value would only ever be used once, when the component is first rendered, and then ignored. The parent would have no way to "force" that state to become something else. If you ever need to reset the input, you'd have to mount it with a different key.

TL;DR : If you want a checkbox to change across components, change it's "key" value (eg: key="{the things id}+{checked or not}"


To test:

  1. Create a form.
  2. Add a Question
  3. Edit the Title, and the Required checkbox.
  4. Note the values, and then click the "More" modal. The values should be the same. Edit them in the Modal.
  5. Click save in the Modal.
  6. Note the values, they should match what you changed. Edit the values again. Open the Modal, they should match again.

Copy link
Contributor

@ShadeWyrm ShadeWyrm merged commit b687e43 into develop Jun 20, 2024
13 checks passed
@ShadeWyrm ShadeWyrm deleted the fix/more-modal-push branch June 20, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More Modal Not Updating Page State w/ Groups
2 participants