diff --git a/packages/smarthr-ui/src/components/AccordionPanel/AccordionPanelContent.tsx b/packages/smarthr-ui/src/components/AccordionPanel/AccordionPanelContent.tsx index 184bd1c8ca..ce7b8c6d79 100644 --- a/packages/smarthr-ui/src/components/AccordionPanel/AccordionPanelContent.tsx +++ b/packages/smarthr-ui/src/components/AccordionPanel/AccordionPanelContent.tsx @@ -31,10 +31,9 @@ export const AccordionPanelContent: FC = ({ className, ... const isInclude = getIsInclude(expandedItems, name) const wrapperRef = useRef(null) const styles = useMemo(() => accordionPanelContent({ className }), [className]) - const nodeRef = useRef(null) return ( - + {(status) => (
= ({ isOpen, children }) => { const styles = useMemo(() => dialogOverlap(), []) const [childrenBuffer, setChildrenBuffer] = useState(null) + const nodeRef = useRef(null) useEffect(() => { if (isOpen) { @@ -36,8 +45,16 @@ export const DialogOverlap: FC = ({ isOpen, children }) => { }, [isOpen, children]) return ( - -
{isOpen ? children : childrenBuffer}
+ +
+ {isOpen ? children : childrenBuffer} +
) }