-
-
Notifications
You must be signed in to change notification settings - Fork 445
feat(form-core): add array method field.filterValues and form.filterFieldValues #1426
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
base: main
Are you sure you want to change the base?
Conversation
View your CI Pipeline Execution ↗ for commit da7be72.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1426 +/- ##
==========================================
- Coverage 88.83% 88.23% -0.60%
==========================================
Files 31 31
Lines 1379 1437 +58
Branches 347 367 +20
==========================================
+ Hits 1225 1268 +43
- Misses 137 151 +14
- Partials 17 18 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…erFieldValues` Co-authored-by: LeCarbonator <[email protected]>
8a4bb38
to
506523e
Compare
I think if/when this gets merged, it would be great to rework the Arrays section of the docs to write about swap, insert, push, filter and clear. Thoughts? Should it be somewhere else? |
The previous implementation of metaHelper could lead to passing wrong index combinations with modes. Splitting them into separate functions allows for explicit requirements depending on mode. The previous implementation is preserved for compatability, but is marked as deprecated.
Oof, it did not like that refactor of metaHelper. I'll get to it later today. Looks like it's beccause I'm trying to avoid a breaking change. I guess I can add some tests for that |
Problem
When setting a field back to an empty array
items[0].firstName
would still exist - when there's a validation on the firstName (on the Field-level)form.canSubmit
would be false.Solution
adding
field.filterValues
andform.filterFieldValues
to TSF: