MCPcopy
hub / github.com/adobe/react-spectrum / getMenu

Method getMenu

packages/@react-aria/test-utils/src/menu.ts:436–439  ·  view source on GitHub ↗

* Returns the menu if present.

()

Source from the content-addressed store, hash-verified

434 * Returns the menu if present.
435 */
436 getMenu(): HTMLElement | null {
437 let menuId = this.getTrigger().getAttribute('aria-controls');
438 return menuId ? document.getElementById(menuId) : null;
439 }
440
441 /**
442 * Returns the menu's sections if any.

Callers 13

findOptionMethod · 0.95
toggleOptionSelectionMethod · 0.95
openSubmenuMethod · 0.95
closeMethod · 0.95
getSectionsMethod · 0.95
getOptionsMethod · 0.95
Menu.test.tsxFile · 0.80
AriaMenuTestsFunction · 0.80
verifyMenuToggleFunction · 0.80

Calls 1

getTriggerMethod · 0.95

Tested by 1

verifyMenuToggleFunction · 0.64