RED-7011: Allow arrow up / down in textareas (spotlight search issue))
This commit is contained in:
parent
61877840c2
commit
53c6e8a5b3
@ -42,20 +42,20 @@ export class SpotlightSearchComponent {
|
|||||||
this.shownActions[this._currentActionIdx].action(this.valueChanges$.getValue());
|
this.shownActions[this._currentActionIdx].action(this.valueChanges$.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('document:keydown.arrowDown', ['$event'])
|
@HostListener('keydown.arrowDown', ['$event'])
|
||||||
@HostListener('document:keydown.arrowUp', ['$event'])
|
@HostListener('keydown.arrowUp', ['$event'])
|
||||||
handleKeyDown(event: KeyboardEvent): void {
|
handleKeyDown(event: KeyboardEvent): void {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('document:keyup.arrowDown', ['$event'])
|
@HostListener('keyup.arrowDown', ['$event'])
|
||||||
handleKeyUpArrowDown(event: KeyboardEvent): void {
|
handleKeyUpArrowDown(event: KeyboardEvent): void {
|
||||||
this.handleKeyDown(event);
|
this.handleKeyDown(event);
|
||||||
const index = this._currentActionIdx + 1;
|
const index = this._currentActionIdx + 1;
|
||||||
this._currentActionIdx$.next(index >= this.shownActions.length ? 0 : index);
|
this._currentActionIdx$.next(index >= this.shownActions.length ? 0 : index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('document:keyup.arrowUp', ['$event'])
|
@HostListener('keyup.arrowUp', ['$event'])
|
||||||
handleKeyUpArrowUp(event: KeyboardEvent): void {
|
handleKeyUpArrowUp(event: KeyboardEvent): void {
|
||||||
this.handleKeyDown(event);
|
this.handleKeyDown(event);
|
||||||
const index = this._currentActionIdx - 1;
|
const index = this._currentActionIdx - 1;
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 8e5376bd4f1f19ae7fdbf031505489853ccecd2e
|
Subproject commit 7d2f5c8a7749ddac57e7aa5c936282db1e23cafe
|
||||||
Loading…
x
Reference in New Issue
Block a user