-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Bug: Issue with formData not updating when dependencies change #4388
base: main
Are you sure you want to change the base?
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.
Wow, this change is really hard to parse given how much has changed.
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.
Yeah, I know I tried to make it little easier with comments. If it's is really hard to grasp and makes things complicated, maybe I can try to simplify it a bit more but I'm not sure if I have time this week.
* @param formData The current formData | ||
* @returns valid formData | ||
*/ | ||
export function getValidFormData<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>( |
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.
This doesn't really check validity w.r.t. to the schema so I think this name might be confusing. Maybe getFormDataMatchingSchema
?
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.
Hi @nickgros, I think it's a much better name but I've changed it to ensureFormDataMatchingSchema
because I think it's slightly better.
Reasons for making this change
Fixes #4325
Checklist
npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update
to update snapshots, if needed.