Skip to content

Commit

Permalink
feature: Add tab key operation on autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
yush-nh authored and ledsun committed Oct 29, 2024
1 parent 2974c21 commit bb3ea3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/component/autocomplete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ export default class Autocomplete {
event.preventDefault()
this.#model.moveHighlightIndexPrevious()
break

case 'Tab':
event.preventDefault()
if (event.shiftKey) {
this.#model.moveHighlightIndexPrevious()
} else {
this.#model.moveHighlightIndexNext()
}
break
}
}

Expand Down

0 comments on commit bb3ea3d

Please sign in to comment.