Skip to content

Commit b5a0c57

Browse files
committed
feat(cdk/a11y): implement onClick, remove lint disables
1 parent 46ea5e4 commit b5a0c57

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/cdk/a11y/key-manager/tree-key-manager.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ import {
2424
import {QueryList} from '@angular/core';
2525
import {isObservable, Observable, Subject} from 'rxjs';
2626

27-
// TODO(cassc): Temporarily disable tslint since this is just the raw API.
28-
// tslint:disable
29-
3027
/** Represents an item within a tree that can be passed to a TreeKeyManager. */
3128
export interface TreeKeyManagerItem {
3229
/** Whether the item is disabled. */
@@ -226,7 +223,9 @@ export class TreeKeyManager<T extends TreeKeyManagerItem> {
226223
* Handles a mouse click on a particular tree item.
227224
* @param treeItem The item that was clicked by the user.
228225
*/
229-
onClick(treeItem: T) {}
226+
onClick(treeItem: T) {
227+
this._setActiveItem(treeItem);
228+
}
230229

231230
/** Index of the currently active item. */
232231
getActiveItemIndex(): number | null {
@@ -318,4 +317,3 @@ export class TreeKeyManager<T extends TreeKeyManagerItem> {
318317
}
319318
}
320319

321-
// tslint:enable

0 commit comments

Comments
 (0)