-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #9499 - Add keyboard support to ContextMenu
- Loading branch information
1 parent
b9ee62d
commit f5bf16b
Showing
4 changed files
with
314 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Subject } from 'rxjs'; | ||
|
||
@Injectable() | ||
export class ContextMenuService { | ||
|
||
private activeItemKeyChange = new Subject<string>(); | ||
|
||
activeItemKeyChange$ = this.activeItemKeyChange.asObservable(); | ||
|
||
activeItemKey: string; | ||
|
||
changeKey(key) { | ||
this.activeItemKey = key; | ||
this.activeItemKeyChange.next(this.activeItemKey); | ||
} | ||
|
||
reset() { | ||
this.activeItemKey = null; | ||
this.activeItemKeyChange.next(this.activeItemKey); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.