Skip to content

Wrong item can be selected where the correct option's text also exists in other options. #340

Open
@edwardhorsford

Description

@edwardhorsford

I spotted a bug / poor handling where the wrong item can be selected if you're using autoselect and showAllValues.

Example:
autocomplete-value-in-others

In my example, each option has some common text appended. There's also an option that is just that text.

If you blur and focus the field again, that text is used as a search string and autoselect then selects the first entry.

The use case in my service is an autocomplete for people's names, with their team name in brackets. The team itself is also available to be selected.

I image similar could happen where any option's text also exists in other options - such as nested categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking change🐛 bugSomething isn't working the way it should (including incorrect wording in documentation)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions