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

Method closeAll

src/aria/private/menu/menu.ts:444–458  ·  view source on GitHub ↗

Closes the menu and all parent menus.

()

Source from the content-addressed store, hash-verified

442
443 /** Closes the menu and all parent menus. */
444 closeAll() {
445 const root = this.root();
446
447 if (root instanceof MenuTriggerPattern) {
448 root.close({refocus: true});
449 }
450
451 if (root instanceof MenuBarPattern) {
452 root.close();
453 }
454
455 if (root instanceof MenuPattern) {
456 root.inputs.activeItem()?.close({refocus: true});
457 }
458 }
459
460 /** Clears any open or close timeouts for sub-menus. */
461 _clearTimeouts() {

Callers 2

MenuPatternClass · 0.95
collapseAllMethod · 0.45

Calls 2

activeItemMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected