MCPcopy Create free account
hub / github.com/DTStack/molecule / initialMenuStyle

Function initialMenuStyle

src/components/menu/menu.tsx:115–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 }
114
115 const initialMenuStyle = () => {
116 menuRef.current?.querySelectorAll('ul').forEach((ul) => {
117 ul.style.opacity = '0';
118 ul.style.pointerEvents = 'none';
119 });
120 menuRef.current
121 ?.querySelectorAll(`li.${activeClassName}`)
122 .forEach((li) => {
123 li.classList.remove(activeClassName);
124 });
125 };
126
127 const detectDomElementByEvent = debounce((e) => {
128 // ensure only when mouse in menu can the submenu toggle visibility

Callers 1

MenuCompFunction · 0.85

Calls 1

removeMethod · 0.65

Tested by

no test coverage detected