-
-
Notifications
You must be signed in to change notification settings - Fork 499
fix(react-form): remap listener paths in withFieldGroup #1654
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 c1d8eb1
☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1654 +/- ##
==========================================
+ Coverage 90.38% 90.48% +0.09%
==========================================
Files 36 36
Lines 1623 1640 +17
Branches 386 390 +4
==========================================
+ Hits 1467 1484 +17
Misses 139 139
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The function to remap listeners should go in However, I like the idea and approach! Let me know if you want help on this PR. |
9724dbe
to
4725028
Compare
Yes... make sense :) Updated and added tests |
Closes #1644
Currently, when using the
withFieldGroup
HOC, the field names provided in thevalidators.onChangeListenTo
andvalidators.onBlurListenTo
arrays are not remapped to their full paths within the form state. This causes linked field validation to fail, as the form cannot find the fields it's supposed to be listening to.remapFieldProps
, has been added to theFieldGroupApi
.useFieldGroup
hook in@tanstack/react-form
now calls this new core method for eachField
andAppField
rendered within the group.