fix: width blink in side bar (#5291)
This commit is contained in:
@@ -149,12 +149,13 @@ export const ResizePanel = forwardRef<HTMLDivElement, ResizePanelProps>(
|
|||||||
ref
|
ref
|
||||||
) {
|
) {
|
||||||
const enableAnimation = useEnableAnimation() && _enableAnimation;
|
const enableAnimation = useEnableAnimation() && _enableAnimation;
|
||||||
|
const safeWidth = Math.min(maxWidth, Math.max(minWidth, width));
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
{...rest}
|
{...rest}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
style={assignInlineVars({
|
style={assignInlineVars({
|
||||||
[styles.panelWidthVar]: `${width}px`,
|
[styles.panelWidthVar]: `${safeWidth}px`,
|
||||||
})}
|
})}
|
||||||
className={clsx(className, styles.root)}
|
className={clsx(className, styles.root)}
|
||||||
data-open={open}
|
data-open={open}
|
||||||
|
|||||||
Reference in New Issue
Block a user