-
-
Notifications
You must be signed in to change notification settings - Fork 503
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 e16ec4e
☁️ 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.52% 90.61% +0.09%
==========================================
Files 37 37
Lines 1688 1705 +17
Branches 421 425 +4
==========================================
+ Hits 1528 1545 +17
Misses 143 143
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 |
9d5f447
to
1d5ce01
Compare
1d5ce01
to
c7c1d84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor things I'll jot down so I don't forget to do them. The new unit tests look good!
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.