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 10, 2018
1 parent e4ec1cd commit b4c51cd
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 b4c51cd

Please sign in to comment.