From d29bc5cfa6d8c2259c2b5c90566cd73514016bb9 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Tue, 10 Apr 2018 08:58:43 -0600 Subject: [PATCH] besure to clear search input to avoid leaving fragment --- src/components/combo_box/combo_box.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index 26047399d59..34be9f85828 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -346,11 +346,14 @@ export class EuiComboBox extends Component { onAddOption = (addedOption) => { const { onChange, selectedOptions, singleSelection } = this.props; onChange(singleSelection ? [addedOption] : selectedOptions.concat(addedOption)); + + this.clearSearchValue(); + if (singleSelection) { this.closeList(); return; } - this.clearSearchValue(); + this.focusSearchInput(); };