-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] List is not filtered when using onChange and onInputChange together #19318
Comments
👋 Thanks for using Material-UI! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support, please check out https://material-ui.com/getting-started/support/. Thanks! If you have a question on StackOverflow, you are welcome to link to it here, it might help others. |
This comment has been minimized.
This comment has been minimized.
We are seeing the same issue in our implementation. Not sure how this is a support issue instead of a bug. Thanks. |
@watkinshughes Without reproduction and working demos in the documentation, we assume it's a support request. |
@oliviertassinari Here is a working demo using both handlers together You can remove Thank you |
@atpollmann You need to have two different states (value + inputValue). |
Thank you @oliviertassinari, my mistake. It is clearly stated in the documentation |
@Aerowiel I have a solution for this, instead of using filterOptions. Instead of
You can use filter in options
|
Current Behavior 😯
When i'm using both onChange and onInputChange in the AutoComplete component it breaks the filtering. I'm forced to use both of them because if you don't use onInputChange the state is not updated when the user write something and exit the textfield without pressing enter.
Expected Behavior 🤔
The list should get filtered while the user is typing more text.
Steps to Reproduce 🕹
Steps:
Context 🔦
Your Environment 🌎
The text was updated successfully, but these errors were encountered: