You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
I have a use case where I am using multiple Field and useField for the same field (same name). Let's call this field A. This is done for performance reasons as I need to conditionally show other fields based on the value of field A. I want to specify a custom isEqual function. However, this doesn't work as the first instance of field A registered defines the isEqual function.
I could define the isEqual function in every instance of field A's Field and useField but this seems excessive and redundant as I would need to do this to every field in this large form in every of Field and useField
What is the expected behavior?
I should be able to define isEqual in any Field and useField instance and it should be applied.
The text was updated successfully, but these errors were encountered:
mjchang
changed the title
isEqual is initialized by the first field registered
isEqual is initialized by the first field registered instance
May 20, 2023
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
I have a use case where I am using multiple
Field
anduseField
for the same field (same name). Let's call this field A. This is done for performance reasons as I need to conditionally show other fields based on the value of field A. I want to specify a customisEqual
function. However, this doesn't work as the first instance of field A registered defines theisEqual
function.I could define the isEqual function in every instance of field A's
Field
anduseField
but this seems excessive and redundant as I would need to do this to every field in this large form in every ofField
anduseField
What is the expected behavior?
I should be able to define
isEqual
in anyField
anduseField
instance and it should be applied.Sandbox Link
https://codesandbox.io/s/staging-voice-8e4nyr?file=/index.js
What's your environment?
[email protected]
[email protected]
[email protected]
[email protected]
Other information
The root cause of this is because the first instance of field A registered defines the
isEqual
function..The text was updated successfully, but these errors were encountered: