Skip to content
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] multiple, filterSelectedOptions, autoHighlight stops working after "no options" state #23065

Closed
2 tasks done
mrac opened this issue Oct 15, 2020 · 1 comment
Closed
2 tasks done
Labels
component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists

Comments

@mrac
Copy link

mrac commented Oct 15, 2020

Autocomplete with flags multiple, filterSelectedOptions, autoHighlight has an issue with autoHighlight stopping working after reaching state "No options" when entering text. Only after user explicitly selects an option from the list (either by mouse click or by arrow-down key), it starts working again.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

For Autocomplete multiple with autoHighlight and filterSelectedOptions, there are issues with auto-highlighting after a user enters text resulting in "No options" state. After reverting, by using Backspace key, the options again are shown, but auto-highlighting no longer works.

Expected Behavior 🤔

After reverting the text, so that "No options" state disappears and options are shown, the matched option should be highlighted again.

Steps to Reproduce 🕹

See code-sandbox - Autocomplete multiple with autoHighlight and filterSelectedOptions.

To reproduce:

  1. Enter text "pulp"
  2. the "Pulp Fiction" option gets highlighted
  3. Add more text like "xxxx"
  4. the "No options" message shows up
  5. Use backspace key to revert and remove "xxxx", and leave the text "pulp" again
  6. No option is highlighted (BUG)

Context 🔦

Your Environment 🌎

Tech Version
Material-UI v4.11.0
React v16.13.1
Browser Google Chrome 86
TypeScript v3.8.2
etc.
@mrac mrac added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 15, 2020
@oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari added component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants