Skip to content

Commit

Permalink
Close EuiComboBox select list when item is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Apr 11, 2018
1 parent b73d27c commit 1c345a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/combo_box/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ export class EuiComboBox extends Component {
onAddOption = (addedOption) => {
const { onChange, selectedOptions, singleSelection } = this.props;
onChange(singleSelection ? [addedOption] : selectedOptions.concat(addedOption));
if (singleSelection) {
this.closeList();
return;
}
this.clearSearchValue();
this.focusSearchInput();
};
Expand Down

0 comments on commit 1c345a3

Please sign in to comment.