MCPcopy Create free account
hub / github.com/angular/components / pendingFocusEffect

Method pendingFocusEffect

src/aria/private/menu/menu.ts:680–691  ·  view source on GitHub ↗

Flushes any pending focus when the menu instance becomes available.

()

Source from the content-addressed store, hash-verified

678
679 /** Flushes any pending focus when the menu instance becomes available. */
680 pendingFocusEffect(): void {
681 const menu = this.inputs.menu();
682 const intent = this.pendingFocus();
683 if (menu && intent) {
684 if (intent === 'first') {
685 menu.first();
686 } else if (intent === 'last') {
687 menu.last();
688 }
689 this.pendingFocus.set(undefined);
690 }
691 }
692
693 /** Handles keyboard events for the menu trigger. */
694 onKeydown(event: KeyboardEvent) {

Callers 2

getMenuTriggerPatternFunction · 0.95
constructorMethod · 0.80

Calls 4

setMethod · 0.80
menuMethod · 0.45
firstMethod · 0.45
lastMethod · 0.45

Tested by 1

getMenuTriggerPatternFunction · 0.76