Skip to content

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

@dfvalero

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

Metadata

Metadata

Assignees

Labels

⚠️ needs validationFor bugs that need confirmation as to whether they're reproducible

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions