We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37db73b commit 4eec0ebCopy full SHA for 4eec0eb
src/OptionList/useKeyboard.ts
@@ -32,15 +32,16 @@ export default (
32
option => option[fieldNames.value] === activeValueCells[i],
33
);
34
35
- if (nextActiveIndex === -1) {
+ const subOption = currentOptions = currentOptions[activeIndex]?.[fieldNames.children];
36
+ if (!subOption?.length || nextActiveIndex === -1) {
37
break;
38
}
39
40
activeIndex = nextActiveIndex;
41
mergedActiveIndexes.push(activeIndex);
42
mergedActiveValueCells.push(activeValueCells[i]);
43
- currentOptions = currentOptions[activeIndex][fieldNames.children];
44
+ currentOptions = subOption;
45
46
47
// Fill last active options
0 commit comments