final-form / react-final-form-arrays

A component for rendering and editing arrays 🏁 React Final Form
MIT License
205 stars 70 forks source link

Cannot set a numeric property on an object #160

Closed majidkorai closed 3 years ago

majidkorai commented 3 years ago

I am following the code example given here on readme.md I am getting the error as in the subject.

Interestingly if I append some letter before priting the field name it works.

name={${fieldName}.name} - this doesn't work. name={a${fieldName}.name} this works. (notice I appended letter a)

Note I can confirm my fieldName is NOT numeric. its a string.

Are you submitting a bug report or a feature request?

What is the current behavior?

What is the expected behavior?

Sandbox Link

What's your environment?

Other information

majidkorai commented 3 years ago

I figured it out. It was happening because I was validating the field. I removed the validation and it started working.