feat(form-core): add array method field.filterValues and form.filterFieldValues#1426
Open
Pascalmh wants to merge 5 commits intoTanStack:mainfrom
Open
feat(form-core): add array method field.filterValues and form.filterFieldValues#1426Pascalmh wants to merge 5 commits intoTanStack:mainfrom
Pascalmh wants to merge 5 commits intoTanStack:mainfrom
Conversation
|
View your CI Pipeline Execution ↗ for commit f5c8c02.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1426 +/- ##
==========================================
- Coverage 89.24% 88.65% -0.59%
==========================================
Files 31 31
Lines 1432 1490 +58
Branches 366 386 +20
==========================================
+ Hits 1278 1321 +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 <18158911+LeCarbonator@users.noreply.github.com>
8a4bb38 to
506523e
Compare
Contributor
|
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.
Contributor
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When setting a field back to an empty array
items[0].firstNamewould still exist - when there's a validation on the firstName (on the Field-level)form.canSubmitwould be false.Solution
adding
field.filterValuesandform.filterFieldValuesto TSF: