-
-
Notifications
You must be signed in to change notification settings - Fork 514
feat(react-form): add onChangeListenTo
/onBlurListenTo
in withFieldGroup
fields
#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
feat(react-form): add onChangeListenTo
/onBlurListenTo
in withFieldGroup
fields
#1654
Conversation
View your CI Pipeline Execution ↗ for commit 6eff1ad
☁️ 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.64% 90.73% +0.09%
==========================================
Files 37 37
Lines 1710 1727 +17
Branches 436 440 +4
==========================================
+ Hits 1550 1567 +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
…oup-mapping-fix
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!
onChangeListenTo
/onBlurListenTo
in withFieldGroup
fields
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.