Closed stefek99 closed 6 years ago
I have react-autocomplete component on my page.
react-autocomplete
It makes sense to choose list of restaurant only after you specify your location.
Therefore I would like to have autocomple initially disabled.
I know there is a method renderInput
renderInput
https://github.com/reactjs/react-autocomplete#renderinput-function-optional
What makes me worried:
At the very least you need to apply props.ref and all props.on event handlers.
I do not know about inner workings and all the events I'd need to attach.
Is there an easier way?
Something like isDisabled flag?
isDisabled
I know it's an open-source, anyone can do this, just checking if there is an already existing way that I'm missing...
Simple.
Easy.
Kind of obvious, once you know it :)
https://github.com/reactjs/react-autocomplete#inputprops-object-optional
I have
react-autocomplete
component on my page.It makes sense to choose list of restaurant only after you specify your location.
Therefore I would like to have autocomple initially disabled.
I know there is a method
renderInput
https://github.com/reactjs/react-autocomplete#renderinput-function-optional
What makes me worried:
I do not know about inner workings and all the events I'd need to attach.
Is there an easier way?
Something like
isDisabled
flag?I know it's an open-source, anyone can do this, just checking if there is an already existing way that I'm missing...