I tried asking this on stackoverflow as suggested here, but there's no response so far: https://stackoverflow.com/questions/49242789/does-react-select-support-maxlength-in-search.
Is this simple enough that I could code it myself if pointed in the right direction?
thanks
Thanks for using StackOverflow first, we appreciate it. Glad you found the solution, and answered for the next person 馃檪
any solution for v2, inputProps has been removed from props of react-select.
this is how you can apply maxLength
pass maxLength
as a props or define in your file
<Select
...
onInputChange={inputValue =>
(inputValue.length <= maxLength ? inputValue : inputValue.substr(0, maxLength))
}
....
/>
Most helpful comment
this is how you can apply maxLength
pass
maxLength
as a props or define in your file