-
-
Notifications
You must be signed in to change notification settings - Fork 434
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(form-core): fix broken sync/async validation state not shifting with array actions (remove,swap,shift,move...) #1324
Conversation
View your CI Pipeline Execution ↗ for commit 6e7a961.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1324 +/- ##
==========================================
+ Coverage 88.86% 88.88% +0.01%
==========================================
Files 28 28
Lines 1275 1286 +11
Branches 332 340 +8
==========================================
+ Hits 1133 1143 +10
- Misses 127 128 +1
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fd9f83a
to
f19d461
Compare
Async validation & sync validation now is fully synced and thoroughly tested with the new errorSourceMap. This reduces the complexity of using the cumulative errors map significantly and fixes all the issues with validations running on the wrong fields when removing/inserting/moving/shifting array fields. Please review when you have time! Thanks! |
394082e
to
2fdca86
Compare
Whoops messed up the rebase, will fix tomorrow |
ed1cdbc
to
bbb68eb
Compare
Updated! Please review when you have time! |
5e0f1ef
to
86ce116
Compare
9adcb07
to
c4f768c
Compare
Previously we were using a cumulative field errors map maintained at the form api level.
This PR removes that data structure in favor of a errorSourceMap data structure that lives within the FieldMeta for each field. This allows shifting/removing/deleting fields to automatically keep the errorSourceMap in sync.
This will fix #1323 and prevent other bugs from being raised around validation not working after other array actions like removing, shifting, swapping, moving, etc...