-
Notifications
You must be signed in to change notification settings - Fork 3
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
[MDCT-1959] Clear nested fields after they are hidden from view #4125
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clears things out and I don't see them in the database! However I'm also seeing an issue with saving to the database in general from the program integrity page. I see it on main too, so likely unrelated, but I can't be sure this isn't saving to the db until I know what's causing that
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me.
@ntsummers1 I agree it's a little odd that the fields remaining in the database, but we don't currently have a method for deleting individual fields from the database. Once they're set, they're set. They don't hurt anything by being there so I figure we're good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing an issue where nested fields aren't rehydrating
Screen.Recording.2022-09-29.at.2.04.02.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't had a chance to check out the functionality myself, but leaving some thoughts on the method because of the CodeClimate cognitive complexity warning.
Description
Closes MDCT-1959: Nested fields shouldn't persist data in form state or save to database
Also fixes what I assume were some incorrect validation types and removes a comma-separated mask on a textarea.
Note: this doesn't really work for fields that are already persisted to the database. Don't worry, it's fine. We'll address that when we do autosave 😬
How to test
Changed Dependencies
N/A
Code author checklist
Reviewer checklist (two different people)