fix(web): optimize Modal width adjustment logic for the log details panel (#20980)

- Use requestAnimationFrame instead of directly calling adjustModalWidth to ensure successful retrieval of clientWidth
pull/21018/head
zhujiruo 11 months ago
parent f6641c0f41
commit 94ec300d4c

@ -354,7 +354,8 @@ function DetailPanel({ detail, onFeedback }: IDetailPanel) {
}
useEffect(() => {
adjustModalWidth()
const raf = requestAnimationFrame(adjustModalWidth)
return () => cancelAnimationFrame(raf)
}, [])
return (

Loading…
Cancel
Save