react-final-form-hooks icon indicating copy to clipboard operation
react-final-form-hooks copied to clipboard

Support for arrays

Open LinusU opened this issue 5 years ago • 4 comments

Feature request

I'm trying to add a small array to one of my forms, but it doesn't seem to be supported at the moment.

Currently, when I to useField on a field that has an array in initialValues, the returned field will have an empty string as .input.value instead of the array passed with initialValues.

Any chance of supporting this? Maybe with a useArrayField()? 🤔

LinusU avatar Jun 12 '19 10:06 LinusU

@LinusU - did you try useFieldArray?

et avatar Jul 20 '19 00:07 et

@et doesn't work because useFieldArray uses a different framework and requires form state to be passed down via context. This library doesn't pass down form state via context.

Togrias avatar Aug 14 '19 09:08 Togrias

Any updates on this? This would be really helpful!

trdaya avatar Aug 10 '20 12:08 trdaya

Any updates? I have the same limitation in my project. I would have to handle arrays outside final form hooks completely

guilhermeKodama avatar Oct 12 '20 12:10 guilhermeKodama