Skip to content

Commit

Permalink
besure to clear search input to avoid leaving fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Apr 10, 2018
1 parent b4c51cd commit 9e3d27e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/combo_box/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};

Expand Down

0 comments on commit 9e3d27e

Please sign in to comment.