From 47fa3efb4bd724ba3c95fcfb4c3303733c8c0491 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Wed, 18 Apr 2018 11:23:20 -0600 Subject: [PATCH] skip disabled options when using keyboard --- src/components/combo_box/combo_box.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/combo_box/combo_box.js b/src/components/combo_box/combo_box.js index d2ee1b3ded5..a3de31946ff 100644 --- a/src/components/combo_box/combo_box.js +++ b/src/components/combo_box/combo_box.js @@ -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) {