-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AutoComplete] Clear AutoComplete Value on click of Button #4736
Comments
I got it working by using setState on the searchText property with refs as in
and the render
|
Duplicate of #2615 |
@itsjimbo Thanks! Your code solved my problem ;) |
Simple if clear button is enabled
|
Hi @dhavalsoni2001, Try this, it's working for me, < Autocomplete inputValue={this.state.labelName} /> |
Is there any straightforward way to achieve this when using autocomplete as an uncontrolled component ? |
I had similar usecase to clear the Autocomplete component using external button, Finally I solved it by changing the key for Autocomplete component, |
How can this be accomplished with a function component? |
+1 to resetting the key. That's the only thing that worked for my use case |
life is full of ups and downs |
I want to store data in list with AutoComplete Component. User write text in AutoComplete Component and clicking on add Button data should stored in list and after that I want to clear AutoComplete Text.
But there is no method or properties to clear Input of AutoComplete.
Version :
0.15.0
The text was updated successfully, but these errors were encountered: