How can I add floating label to react-select?
How can I add floating label to react-select?
I'm trying to build web app using MaterialUI theme and I need to use autocomplete .. It turns out MUI v2 does not have AutoComplete and docs suggest using alternatives. react-select has all functionality I need - but I cannot figure out how to make it look similarly to other controls - specifically how to make floating label to float away when user starts typing or click on dropdown.
What I did:
<Input>
<IntegratedSelect>
.. and tried a lot of different other approaches (setting refs, using FloatingLabel from @material/react-floating-label etc).. with no luck.
Can you please advise how can I trigger float on the label, or otherwise hookup react-select control with floating label?
Any help will be appreciated!
Regards,
VB
P.S. Gist added: https://gist.github.com/mspclaims/e07bf1ff657fa8eb4756bc0514a164fe
I updated post to include link to gist with source code and screenshot. Thanks for looking!
– vba66a
Aug 26 at 16:07
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Can you share relevant code?
– Anas
Aug 26 at 6:04