clear width/hieght on done
This commit is contained in:
parent
52c731c794
commit
de6115248a
@ -17,7 +17,7 @@ export const Menu =(props:{children:React.JSX.Element|React.JSX.Element[]})=>
|
|||||||
const [stateGet, stateSet] = React.useContext(CTX);
|
const [stateGet, stateSet] = React.useContext(CTX);
|
||||||
const refElement:React.MutableRefObject<HTMLElement|null> = React.useRef( null );
|
const refElement:React.MutableRefObject<HTMLElement|null> = React.useRef( null );
|
||||||
const refControl:React.MutableRefObject<CollapseControls|null> = React.useRef( null );
|
const refControl:React.MutableRefObject<CollapseControls|null> = React.useRef( null );
|
||||||
|
|
||||||
const classDefault = "relative transition-all duration-700 border";
|
const classDefault = "relative transition-all duration-700 border";
|
||||||
const classOpen = "h-auto w-auto top-10 px-4 ";
|
const classOpen = "h-auto w-auto top-10 px-4 ";
|
||||||
const classShut = "h-0 w-[300px] top-0 px-0";
|
const classShut = "h-0 w-[300px] top-0 px-0";
|
||||||
@ -57,7 +57,8 @@ export function Collapser(inElement:HTMLElement, initialState = false)
|
|||||||
inEvent.stopPropagation();
|
inEvent.stopPropagation();
|
||||||
if (userMode)
|
if (userMode)
|
||||||
{
|
{
|
||||||
inElement.style.height = "auto";
|
inElement.style.height = "";
|
||||||
|
inElement.style.width = "";
|
||||||
inElement.style.overflow = "visible";
|
inElement.style.overflow = "visible";
|
||||||
}
|
}
|
||||||
userDone(userMode);
|
userDone(userMode);
|
||||||
|
Loading…
Reference in New Issue
Block a user