Skip to content

Commit a5949e8

Browse files
authored
Merge pull request #346 from eccenca/fix/resizingValueFormularEditorBug
Fix node resizing
2 parents 054e91d + 5587ff3 commit a5949e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/extensions/react-flow/nodes/NodeContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ export function NodeContent<CONTENT_PROPS = React.HTMLAttributes<HTMLElement>>({
754754
nodeContentRef.current.style.height = `${nextHeight}px`;
755755
}
756756
}
757-
}, [resizeDirections, originalSize])
757+
}, [resizeDirections, originalSize, width, height])
758758

759759
const onResizeStop = React.useCallback((_0, _1, _2, d) => {
760760
const nextWidth = validateWidth((width ?? originalSize.current.width ?? 0) + d.width);
@@ -767,7 +767,7 @@ export function NodeContent<CONTENT_PROPS = React.HTMLAttributes<HTMLElement>>({
767767
width: nextWidth,
768768
});
769769
}
770-
}, [onNodeResize])
770+
}, [onNodeResize, width, height, originalSize]);
771771

772772
const resizableSize = React.useMemo(() => ({ height: height ?? "auto", width: width ?? "auto" }), [height, width]);
773773
const enableResize = React.useMemo(() => resizeDirections!.bottom && resizeDirections!.right ? { bottomRight: true } : resizeDirections, [resizeDirections]);

0 commit comments

Comments
 (0)