Skip to content

Commit 6184a0f

Browse files
committed
check resizing for all property changes, otherwise class information is lost
1 parent 765782d commit 6184a0f

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
@@ -404,7 +404,7 @@ export function NodeContent<CONTENT_PROPS = any>({
404404
setHeight(updateHeight);
405405
}, [nodeDimensions]);
406406

407-
// initial dimension before resize
407+
// resizing check and conditional enhancements
408408
React.useEffect(() => {
409409
saveOriginalSize();
410410
const currentClassNames = nodeContentRef.current.classList;
@@ -433,7 +433,7 @@ export function NodeContent<CONTENT_PROPS = any>({
433433
nodeContentRef.current.classList.add("is-resizable-vertical");
434434
}
435435
}
436-
}, [nodeContentRef, onNodeResize, minimalShape, resizeDirections]);
436+
}); // need to be done everytime a property is changed an the element is re-rendered, otherwise the resizing class is lost
437437

438438
// remove introduction class
439439
React.useEffect(() => {

0 commit comments

Comments
 (0)