Skip to content

Commit 75f12fc

Browse files
committed
chore: remove duplicated FocusKeyManager
Removes the FocusKeyManager class that was duplicated from the CDK.
1 parent b5fc68b commit 75f12fc

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/lib/core/a11y/focus-key-manager.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,4 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {ListKeyManager, ListKeyManagerOption} from './list-key-manager';
10-
11-
/**
12-
* This is the interface for focusable items (used by the FocusKeyManager).
13-
* Each item must know how to focus itself, whether or not it is currently disabled
14-
* and be able to supply it's label.
15-
*/
16-
export interface FocusableOption extends ListKeyManagerOption {
17-
focus(): void;
18-
}
19-
20-
export class FocusKeyManager<T> extends ListKeyManager<FocusableOption & T> {
21-
/**
22-
* This method sets the active item to the item at the specified index.
23-
* It also adds focuses the newly active item.
24-
*/
25-
setActiveItem(index: number): void {
26-
super.setActiveItem(index);
27-
28-
if (this.activeItem) {
29-
this.activeItem.focus();
30-
}
31-
}
32-
}
9+
export {FocusKeyManager, FocusableOption} from '@angular/cdk/a11y';

0 commit comments

Comments
 (0)