2

I use ReactJS v18.2 with react-select v5.7.

I want to add a custom attribute (e.g. data-test) to the input element of my <Select/> component, I could not find something like this in the docs.

For my own custom functional components, it just works to add it to the html tag, e.g.

<input type="text" test={XYZ}/>

For react-select, it does not show up in the DOM at all. How can I fix it?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.