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

Method closeAll

src/aria/private/menu/menu.ts:441–455  ·  view source on GitHub ↗

Closes the menu and all parent menus.

()

Source from the content-addressed store, hash-verified

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

Callers 2

MenuPatternClass · 0.95
collapseAllMethod · 0.45

Calls 2

activeItemMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected