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

Async autocomplete not working with groupBy #20372

Closed
2 tasks done
FerusAndBeyond opened this issue Apr 1, 2020 · 5 comments · Fixed by #20376
Closed
2 tasks done

Async autocomplete not working with groupBy #20372

FerusAndBeyond opened this issue Apr 1, 2020 · 5 comments · Fixed by #20376
Assignees
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module!

Comments

@FerusAndBeyond
Copy link

FerusAndBeyond commented Apr 1, 2020

When you use groupBy with a asynchronous autocomplete, that is adding options dynamically the wrong option is selected when you select an option. A reproducable example from the docs for autocomplete and just adding the groupBy for the first letter:

https://codesandbox.io/s/material-demo-dt5o7

Now when you select an option some other country is selected.

  • 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 😯

Selects wrong option

Expected Behavior 🤔

Select correct option

Steps to Reproduce 🕹

https://codesandbox.io/s/material-demo-dt5o7

Context 🔦

I want to use groupBy

Your Environment 🌎

Tech Version
Material-UI v4.9.4
React 16.12.0
Material-UI Lab ^4.0.0-alpha.47
@oliviertassinari oliviertassinari added the status: waiting for author Issue with insufficient information label Apr 1, 2020
@oliviertassinari
Copy link
Member

Could you follow our issue template? It would be awesome. Most specifically, on the actual, expected and reproduction steps. Thanks.

@FerusAndBeyond
Copy link
Author

@oliviertassinari Done

@oliviertassinari
Copy link
Member

@FerusAndBeyond I can't reproduce.

@oliviertassinari oliviertassinari added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 1, 2020
@FerusAndBeyond
Copy link
Author

@oliviertassinari Go to https://codesandbox.io/s/material-demo-dt5o7, click on the autocomplete, select "Algeria". When I do so I get "Russia" instead.

@oliviertassinari oliviertassinari removed the status: waiting for author Issue with insufficient information label Apr 1, 2020
@oliviertassinari
Copy link
Member

@FerusAndBeyond Thanks! We now have enough information to investigate :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: autocomplete This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants