MCPcopy Index your code
hub / github.com/angular/components / closeAll

Method closeAll

src/aria/private/menu/menu.ts:440–454  ·  view source on GitHub ↗

Closes the menu and all parent menus.

()

Source from the content-addressed store, hash-verified

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

Callers 2

MenuPatternClass · 0.95
collapseAllMethod · 0.45

Calls 2

activeItemMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected