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: correctly mutate deep field array item and trigger validation #3974

Merged
merged 1 commit into from
Oct 23, 2022

Conversation

logaretm
Copy link
Owner

@logaretm logaretm commented Oct 23, 2022

What

Since computed didn't offer deep setter triggers it made mutating a reference type field entry item mutable and didn't trigger validation.

This PR fixes that by introducing a proxy between the form and the field array item that can be deep-watched, so it can trigger validation while disallowing direct mutations over the computed property result.

closes #3968

@logaretm logaretm self-assigned this Oct 23, 2022
@logaretm logaretm merged commit 267736f into main Oct 23, 2022
@logaretm logaretm deleted the fix/3968-deep-array-value-item-setter branch October 23, 2022 01:33
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.

[v4 useFieldArray] doesn't trigger validation
1 participant