-
-
Notifications
You must be signed in to change notification settings - Fork 390
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(core): form listeners #1261
base: main
Are you sure you want to change the base?
Conversation
View your CI Pipeline Execution ↗ for commit cd42633.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1261 +/- ##
==========================================
+ Coverage 88.81% 88.89% +0.08%
==========================================
Files 28 28
Lines 1269 1279 +10
Branches 331 331
==========================================
+ Hits 1127 1137 +10
Misses 127 127
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
const form = new FormApi({ | ||
defaultValues: { | ||
items: ['one', 'two'], | ||
age: 0, | ||
}, | ||
listeners: { | ||
onChange: ({ formApi, fieldName }) => { | ||
arr = formApi.state.values[fieldName] | ||
name = fieldName | ||
}, | ||
}, | ||
}) | ||
form.mount() |
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.
I need a pointer as to why fieldName is "excessively deep and possibly infinite" it will only happen when there is more than one field in the formApi.
Adds form listeners to formApi.