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?
When registering a field for both the array as a whole and individual array items, with array validation and item validation, final-form can throw an error.
Pretty niche use case to want fields for both the array as a whole and individual array items.
This is from not setting the ARRAY_ERROR quite as final-form wants it, but requiring that is hard to interop with e.g. yup. Mainly reporting this issue to record the error case, rather than because I expect a fix.
Another workaround is not to register fields for array items where not required - when using FieldArray like this, can use field.values to get the value, which is sufficient if we're just trying to read the value.
The text was updated successfully, but these errors were encountered:
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
When registering a field for both the array as a whole and individual array items, with array validation and item validation, final-form can throw an error.
Pretty niche use case to want fields for both the array as a whole and individual array items.
https://codesandbox.io/s/react-final-form-field-arrays-forked-vjf4lg?file=/index.js
Click one entry in the multi select -
Cannot set a numeric property on an object
The error comes from using final-form-arrays, but is thrown from final-form.
What is the expected behavior?
Setting no exception (
setIn
is setting undefined`) should not blow up hereSandbox Link
What's your environment?
Final-form 4.12.0
final-form-arrays 1.1.2
react-final-form 4.1.0
react-final-form-arrays 2.0.3
Other information
This is from not setting the
ARRAY_ERROR
quite as final-form wants it, but requiring that is hard to interop with e.g. yup. Mainly reporting this issue to record the error case, rather than because I expect a fix.Another workaround is not to register fields for array items where not required - when using FieldArray like this, can use
field.values
to get the value, which is sufficient if we're just trying to read the value.The text was updated successfully, but these errors were encountered: