Skip to content

[EuiComboBox] Avoid adding duplicated items when copy/pasting duplicated values #8334

Closed

Description

@dfvalero

Describe the bug

When using <EuiComboBox /> with a delimiter prop and adding duplicated values, the component adds all values.

Impact and severity

Low severity. I found the issue when adding this component in our application. It's a nice to have.

Environment and versions

  • EUI version: latest
  • React version: 18
  • Browser: Chrome
  • Operating System: Mac

To Reproduce

  1. Go to the Combo box with "With delimiter" section.
  2. Paste this value: "a, a, a, a".
  3. Press enter or focus out the component.
  4. All 4 values are added.

Expected behavior

Only one value needs to be added.

Screenshots

demo.mov

Activity

  1. added
    ⚠️ needs validation
    on Feb 19, 2025
  2. self-assigned this
    on Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

⚠️ needs validation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions