Add basic keyboard navigation support for the Fizzy do menu

This commit is contained in:
Jorge Manrubia
2025-05-07 13:33:54 +02:00
parent 0dcc6959da
commit 87484dbca0
5 changed files with 19 additions and 7 deletions
@@ -13,7 +13,15 @@ export default class extends Controller {
}
}
selectLast(event) {
selectCurrentOrLast(event) {
if (this.currentItem) {
this.#setCurrentFrom(this.currentItem)
} else {
this.selectLast()
}
}
selectLast() {
this.#setCurrentFrom(this.itemTargets[this.itemTargets.length - 1])
}