Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class BaseOptionsSelector extends Component {
this.state = {
allOptions,
focusedIndex,
shouldDisableRowSelection: false,
};
}

Expand All @@ -59,8 +60,16 @@ class BaseOptionsSelector extends Component {
if (!focusedOption) {
return;
}

this.selectRow(focusedOption);
if (this.props.canSelectMultipleOptions) {
this.selectRow(focusedOption);
Comment thread
AmjedNazzal marked this conversation as resolved.
} else if (!this.state.shouldDisableRowSelection) {
this.setState({shouldDisableRowSelection: true});
let result = this.selectRow(focusedOption);
if (!(result instanceof Promise)) {
result = Promise.resolve();
}
setTimeout(() => result.finally(() => this.setState({shouldDisableRowSelection: false})), 500);
}
},
enterConfig.descriptionKey,
enterConfig.modifiers,
Expand Down