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

FIO-7937/FIO-7953: Fixes issues where Reset action does not clear values and restore the default ones #5939

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexandraRamanenka
Copy link
Contributor

@alexandraRamanenka alexandraRamanenka commented Dec 6, 2024

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-7937
https://formio.atlassian.net/browse/FIO-7953

Description

  1. Call setValue of the Component Modal while resetting value, because it has its own copy of the value that has to be reset separetely (it was leading to modal preview showing the old value after Reset and restoring the value after opening and closing modal window without saving it after cklicking Reset)
  2. Change teh order of calling parent component resetValue and child components reset Value in NestedComponent since otherwise it will restore the deafult value of the parent component, but then all the child compopnents wil reset to the empty value.
  3. redraw the Address component after resetting value as well to reflect the change visually.
  4. Removed custom resetValue method of EditGrid that was calling emptyRows methos after resetting the value (the change was made for Dynamic Wizard fix that is no longer supported)
  5. Made an uncheckValue method for Radio component to use when the user clicks already selected value to uncheck it instead of using resetValue method that should restore the deafult/empty value by design

Breaking Changes / Backwards Compatibility

Use this section to describe any potentially breaking changes this PR introduces or any effects this PR might have on backwards compatibility

Dependencies

Use this section to list any dependent changes/PRs in other Form.io modules

How has this PR been tested?

Use this section to describe how you tested your changes; if you haven't included automated tests, justify your reasoning

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

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.

1 participant