From 591b1c34f1cc069450a41f522e6eeb3251eac43f Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 13 Mar 2019 14:26:01 -0600 Subject: [PATCH 1/2] Don't create a custom combobox option if user clicked on an option --- src/components/combo_box/combo_box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index b6a0693d284..2efa74e7575 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -290,7 +290,7 @@ export class EuiComboBox extends Component { // If the user tabs away or changes focus to another element, take whatever input they've // typed and convert it into a pill, to prevent the combo box from looking like a text input. - if (!this.hasActiveOption() && !focusedInInput) { + if (!this.hasActiveOption() && !focusedInInput && !focusedInOptionsList) { this.addCustomOption(); } } From 7cebdecda013d8aa9243a82167f8b150d2190d6d Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 13 Mar 2019 14:36:43 -0600 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 544c06d6ea4..c8fdfa33b9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ **Bug fixes** - Removed all `lodash` imports in `eui.d.ts` to avoid namespace pollution ([#1723](https://github.com/elastic/eui/pull/1723)) +- Prevent `EuiComboBox` from creating a custom option value when user clicks on a value in the dropdown ([#1728](https://github.com/elastic/eui/pull/1728)) ## [`9.3.0`](https://github.com/elastic/eui/tree/v9.3.0)