-
-
Notifications
You must be signed in to change notification settings - Fork 502
fix(FieldApi): onChangeListenTo should not block onChangeAsync validator on field it is listening to #1420
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
…tor on field it is listening to Signed-off-by: Pascal Küsgen <pascalkuesgen@gmail.com>
View your CI Pipeline Execution ↗ for commit b627e3d.
☁️ Nx Cloud last updated this comment at |
It appears |
…on field it is listening to
I believe this error may be related to how linked fields contribute to the hasErrored property. Since the linked field errors, it no longer tries to perform the async error of the current field. |
I believe this can cause another problem, but I'm not confident I wrote the proper test case for it: If two fields share a common |
Running into similar issues with inter-dependant fields. new FieldApi({
name: 'field_1',
validators: {
onChangeListenTo: ['field_2', 'field_3'],
onChangeAsync: async (props) => {
// magical async stuff
}
},
})
new FieldApi({
name: 'field_2',
validators: {
onChangeListenTo: ['field_1'],
onChangeAsync: async (props) => {
// magical async stuff
}
},
})
new FieldApi({
name: 'field_2',
validators: {
onChangeListenTo: ['field_1'],
onChangeAsync: async (props) => {
// magical async stuff
}
},
}) Shifting from using |
fixes #1410