Skip to content

Commit 0b436c4

Browse files
authored
refactor(cdk/a11y): use correct method when updating active item (#24232)
Follow-up to #14471. Uses `setActiveItem` instead of `updateActiveItem` which was missed when addressing the feedback.
1 parent e61c2fa commit 0b436c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class ListKeyManager<T extends ListKeyManagerOption> {
7373
if (newIndex !== this._activeItemIndex) {
7474
// Timeout is required to avoid "changed after checked" errors.
7575
setTimeout(() => {
76-
this.updateActiveItem(newIndex > -1 ? newIndex : this._activeItemIndex);
76+
this.setActiveItem(newIndex > -1 ? newIndex : this._activeItemIndex);
7777
}, 0);
7878
}
7979
}

0 commit comments

Comments
 (0)