Skip to content

Commit

Permalink
skip disabled options when using keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Apr 18, 2018
1 parent c355fed commit 47fa3ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/combo_box/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ export class EuiComboBox extends Component {
}

// Group titles are included in option list but are not selectable
// Skip group title options
// Skip group title options and disabled options
const direction = amount > 0 ? 1 : -1;
while (this.matchingOptions[nextActiveOptionIndex].isGroupLabelOption) {
while (this.matchingOptions[nextActiveOptionIndex].isGroupLabelOption
|| this.matchingOptions[nextActiveOptionIndex].disabled) {
nextActiveOptionIndex = nextActiveOptionIndex + direction;

if (nextActiveOptionIndex < 0) {
Expand Down

0 comments on commit 47fa3ef

Please sign in to comment.