react-final-form-arrays
react-final-form-arrays copied to clipboard
Keep consistency in example, TL;DR use id as key instead of name
Are you submitting a bug report or a feature request?
I'd like to have an example using id as key instead of name, to prevent an error to display close to the wrong field for instance.
What is the current behavior?
The basic array example is working fine because there is no validation, but if we add validation to this form, it would be buggy as we use "name" as key prop in the loop.
What is the expected behavior?
We should probaly add a more real worl example with validation and then use a generated id (like Math.random.toString())
Sandbox Link
What's your environment?
Other information
Thank you @erikras
@erikras Is it possible to use id instead of index or name at this moment ? Because of this problem, we can't add enter/exit animation on proper Field.
Here is the example using react-pose below. Whichever you remove, the fade out animation always happens on very bottom of the items. https://codesandbox.io/s/m42oxprp8j
Another issue is usage with something like react-tables
. The table can be re-sorted, filtered and it's very hard to support the indexes.