Skip to content

Commit 15768c7

Browse files
committed
fix(ResizablePanel): infinite loop in controllable mode * 6
1 parent 3ebe46f commit 15768c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/layout/ResizablePanel.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@ function ResizablePanel(
269269

270270
useEffect(() => {
271271
if (
272-
(providedSize == null || Math.abs(providedSize - visualSize) > 0.5) &&
273-
!isDragging
272+
!isDragging &&
273+
visualSize != null &&
274+
(providedSize == null || Math.abs(providedSize - visualSize) > 0.5)
274275
) {
275276
onSizeChange?.(Math.round(visualSize));
276277
}

0 commit comments

Comments
 (0)