Hi everyone,
I’m working on a form where I’ve built a custom select component, and I’m using two instances of it inside the same form - for example, one for gender and another just for demo purposes custom field (see screenshot attached).
Each select component is configured with a different Field name
id which is passed via prop, however when I inspect the form’s data and change their values, both values are being written to the same key (gender in this case) and overwriting each other’s value. The result is the form treating them as one field, even though they are distinct in the UI.
How can I ensure that each component correctly updates its own corresponding key in formData
?
Any insight would be appreciated. Thanks!