react-select cannot set id
In version >= 2 of react-select, the prop to set the id is called inputId
. Use it like this:
<Select inputId="your-custom-id" />
You can use the inputProps
prop as in the docs.
If what you want is focus when clicking the corresponding label, passing id
inside inputProps
should work.
<label htmlFor={'fieldId'} />
<Select inputProps={{ id: 'fieldId' }} /> // should be an object