MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / _setOpen

Function _setOpen

core/src/utils/menu-controller/index.ts:177–188  ·  view source on GitHub ↗
(menu: MenuI, shouldOpen: boolean, animated: boolean, role: string)

Source from the content-addressed store, hash-verified

175 };
176
177 const _setOpen = async (menu: MenuI, shouldOpen: boolean, animated: boolean, role: string): Promise<boolean> => {
178 if (isAnimatingSync()) {
179 return false;
180 }
181 if (shouldOpen) {
182 const openedMenu = await getOpen();
183 if (openedMenu && menu.el !== openedMenu) {
184 await openedMenu.setOpen(false, false);
185 }
186 }
187 return menu._setOpen(shouldOpen, animated, role);
188 };
189
190 const _createAnimation = (type: string, menuCmp: MenuI) => {
191 const animationBuilder = menuAnimations.get(type) as any; // TODO(FW-2832): type

Callers

nothing calls this directly

Calls 4

isAnimatingSyncFunction · 0.85
getOpenFunction · 0.85
setOpenMethod · 0.65
_setOpenMethod · 0.65

Tested by

no test coverage detected