Skip to content

Duplication of opshins in case of identical label values in Autocomplete #46917

@ArtemTolmach

Description

@ArtemTolmach

Steps to reproduce

Steps:

  1. Use MUIAutoComplete component
  2. Pass him options with the same label values
  3. Start looking for values that are not in the duplicated labels
  4. Next, an option will appear that we weren't looking for.
  5. Delete the value in the input and enter it again
  6. The options are quickly added

Bug playback video
https://github.com/user-attachments/assets/6dd02879-93ab-44fa-8d24-aa29ca07b424

Current behavior

Bug playback video
https://github.com/user-attachments/assets/6dd02879-93ab-44fa-8d24-aa29ca07b424

Expected behavior

Expected behavior:
I can have multiple objects with the same label value in my options. Filtering when searching for the desired option should work correctly and output only the values I am looking for.

If I search for "Second", then only "Second" should be output. There should be no "Firsts"

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: Autocomplete, Filter, Duplicate, Option, Label

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: autocompleteChanges related to the autocomplete. This includes ComboBox.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions