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 11, 2018
1 parent 1c345a3 commit d29bc5c
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 d29bc5c

Please sign in to comment.