2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-29 05:14:04 +03:00

fix: fix keyboard option navigation skipping all items (#1165)

Fixes #1161. Navigating with up or down arrows would always go to first and last option, skipping
everything in between. Caused by missing break statements, probably deleted by accident.

#1161

Co-authored-by: Dino Pejaković <dino.pejakovic@voxdiversa.hr>
This commit is contained in:
inoric
2020-04-18 00:26:30 +02:00
committed by GitHub
parent 538df2c1f3
commit f47180cdae
+2
View File
@@ -26,6 +26,7 @@ export default {
for (let i = this.typeAheadPointer - 1; i >= 0; i--) {
if (this.selectable(this.filteredOptions[i])) {
this.typeAheadPointer = i;
break;
}
}
},
@@ -39,6 +40,7 @@ export default {
for (let i = this.typeAheadPointer + 1; i < this.filteredOptions.length; i++) {
if (this.selectable(this.filteredOptions[i])) {
this.typeAheadPointer = i;
break;
}
}
},