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

[CMDCT-2] Fix clear prop hiding users answers when they click cancel but come back #11515

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

ntsummers1
Copy link
Contributor

@ntsummers1 ntsummers1 commented Nov 8, 2023

Description

If you edit a field when inside of a drawer or a modal and then click cancel, it would end up showing that field as edited (Though the backend still had its original answer). This can be very jarring to the user, so this PR fixes the clear prop thats causing this discrepancy!

Related ticket(s)

CMDCT-2


How to test

Create a MCPAR form
Go to Access Measures (Or any drawer form or modal form you want)
Create an Access Measure
Click edit Access Measure to reopen to modal.
Edit a text field
Click Cancel
Click edit Access Measure again
See your text field has your original answer!


Author checklist

  • I have performed a self-review of my code
  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary

Copy link

codeclimate bot commented Nov 9, 2023

Code Climate has analyzed commit 6c58543 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 96.0% (0.0% change).

View more on Code Climate.

@ntsummers1 ntsummers1 added ready for review Ready for all the reviews! and removed draft Just a draft labels Nov 9, 2023
Copy link
Collaborator

@karla-vm karla-vm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

Copy link
Contributor

@gmrabian gmrabian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to replicate the bug in MCR dev 🐛 😶‍🌫️

@ntsummers1 ntsummers1 merged commit 897672f into main Nov 14, 2023
@ntsummers1 ntsummers1 deleted the nested-clear-prop branch November 14, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants