mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-19 02:49:56 +00:00
Update selectorModal.component.ts
This commit is contained in:
parent
4a1d8cdd0d
commit
a26b30f0bc
@ -29,9 +29,11 @@ export class SelectorModalComponent<T> {
|
|||||||
@HostListener('keyup', ['$event']) onKeyUp (event: KeyboardEvent): void {
|
@HostListener('keyup', ['$event']) onKeyUp (event: KeyboardEvent): void {
|
||||||
if (event.key === 'ArrowUp') {
|
if (event.key === 'ArrowUp') {
|
||||||
this.selectedIndex--
|
this.selectedIndex--
|
||||||
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
if (event.key === 'ArrowDown') {
|
if (event.key === 'ArrowDown') {
|
||||||
this.selectedIndex++
|
this.selectedIndex++
|
||||||
|
event.preventDefault()
|
||||||
}
|
}
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
this.selectOption(this.filteredOptions[this.selectedIndex])
|
this.selectOption(this.filteredOptions[this.selectedIndex])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user