I'm trying to build a form with custom generic components, using RHF and react-select.
When I submit the form, I want the select to give me 'option-1', instead of { value: 'option-1', label: 'Option 1' }.
While it doesn't seem very complicated, I can't get it right and I keep getting confused around RHF Controller usage and Select props.
Because of the generic approach, I don't want to transform the data at the form level, and would like to keep the logic in the SelectField component.
Here is a codesandbox
Thank you for your help.