We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6ea1f6 commit 8057d14Copy full SHA for 8057d14
src/components/layout/ResizablePanel.tsx
@@ -200,8 +200,8 @@ function ResizablePanel(
200
201
const offsetProp = isHorizontal ? 'offsetWidth' : 'offsetHeight';
202
203
- if (ref.current && Math.abs(ref.current[offsetProp] - size) > 1) {
204
- setSize(ref.current[offsetProp]);
+ if (ref.current && Math.abs(ref.current[offsetProp] - size) >= 1) {
+ setSize(Math.round(ref.current[offsetProp]));
205
}
206
},
207
onMove(e) {
@@ -229,7 +229,7 @@ function ResizablePanel(
229
230
useEffect(() => {
231
if (providedSize == null || Math.abs(providedSize - size) > 0.5) {
232
- onSizeChange?.(size);
+ onSizeChange?.(Math.round(size));
233
234
}, [size]);
235
0 commit comments