diff --git a/example/tree-menu.tsx b/example/tree-menu.tsx index d626f8f..8d15542 100644 --- a/example/tree-menu.tsx +++ b/example/tree-menu.tsx @@ -17,7 +17,7 @@ export const Menu =(props:{children:React.JSX.Element|React.JSX.Element[]})=> const [stateGet, stateSet] = React.useContext(CTX); const refElement:React.MutableRefObject = React.useRef( null ); const refControl:React.MutableRefObject = React.useRef( null ); - + const classDefault = "relative transition-all duration-700 border"; const classOpen = "h-auto w-auto top-10 px-4 "; const classShut = "h-0 w-[300px] top-0 px-0"; @@ -57,7 +57,8 @@ export function Collapser(inElement:HTMLElement, initialState = false) inEvent.stopPropagation(); if (userMode) { - inElement.style.height = "auto"; + inElement.style.height = ""; + inElement.style.width = ""; inElement.style.overflow = "visible"; } userDone(userMode);