[Autocomplete] Filter error with two equal names in the list
See original GitHub issueDuplicates
- I have searched the existing issues
Latest version
- I have tested the latest version
Current behavior 😯
dulicate ‘title’ will cause filter error
Expected behavior 🤔
should be shown the correct answer
Steps to reproduce 🕹
Steps:
- goto https://mui.com/components/autocomplete/
- Find the “Free Solo Dialog”
- Copy the Code
- Direct place in and run
- add 1 or more same title in the “top100Films” list, ie.{ title: ‘The Shawshank Redemption’, year: 1994 },{ title: ‘The Shawshank Redemption’, year: 1994 },{ title: ‘The Shawshank Redemption’, year: 1994 },
- Try key in “shaaaaa”,
- those filter items will still remain
Context 🔦
nothing special, just wasted few hours to find out what is the problems, the the end found the original code already got error. ya. maybe can implement self filter code, but this is not the reason i choose to use MUI.
hope your guy got time help fix, thanks appreciate all of you. have a good day.
Your environment 🌎
`npx @mui/envinfo`
Don't forget to mention which browser you used.
ANS : Chrome
output =
System:
OS: Windows 10 10.0.19044
Binaries:
Node: 14.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 99.0.4844.74
Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.46)
npmPackages:
@emotion/react: ^11.7.1 => 11.8.1
@emotion/styled: ^11.6.0 => 11.8.1
@mui/base: 5.0.0-alpha.70
@mui/icons-material: ^5.2.1 => 5.4.4
@mui/lab: ^5.0.0-alpha.60 => 5.0.0-alpha.71
@mui/material: ^5.2.3 => 5.4.4
@mui/private-theming: 5.4.4
@mui/styled-engine: 5.4.4
@mui/system: 5.4.4
@mui/types: 7.1.2
@mui/utils: 5.4.4
@types/react: 17.0.39
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
typescript: 4.6.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
material ui - Autocomplete multiple error - Stack Overflow
When using multiple , value must be an array (see multiple in the docs). I found this answer helpful for using a controlled...
Read more >Autocomplete with filter compound query - MongoDB Atlas
I want to search autocomplete on different fields but filtered by a different field exports.userNameCitySearchAutocomplete = async function ...
Read more >Autocomplete Questions & Supplemental Data - Qualtrics
Autocomplete is a text entry question type that can guess the answer a respondent's going to give. It draws on a list of...
Read more >Autocomplete | Primer React
Autocomplete. Used to render a text input that allows a user to quickly filter through a list of options to pick one or...
Read more >Auto-complete for reference fields
Suppress filters and breadcrumbs with list controls ... The auto-complete options now include both the user name and department. Auto-complete list ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shawnlwy85
A colleague from my job found that if you set the key property for each option with an UUID this solved the issue,
Something like:
We should consider adding this to the library in the default option render.
thanks for the details explanation