From 75dd9255bfc50d1dd356317ffff304467ac5b1eb Mon Sep 17 00:00:00 2001 From: Aqib Mirza Date: Thu, 27 Jul 2023 16:46:27 +0530 Subject: [PATCH] fix: container height fix on child delete --- client/packages/lowcoder/src/layout/gridLayout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/packages/lowcoder/src/layout/gridLayout.tsx b/client/packages/lowcoder/src/layout/gridLayout.tsx index 6eae5a248..52ff9d0ab 100644 --- a/client/packages/lowcoder/src/layout/gridLayout.tsx +++ b/client/packages/lowcoder/src/layout/gridLayout.tsx @@ -147,7 +147,7 @@ class GridLayout extends React.Component { ); // log.debug("layout: getDrivedState. nextProps: ", nextProps.layout, " prevState: ", prevState.layout, " newLayoutBase: ", newLayoutBase, " newLayout: ", newLayout); return { - layout: draggingUtils.isDragging() ? newLayout : nextProps.layout, + layout: draggingUtils.isDragging() || !childrenEqual(nextProps.children, prevState.children) ? newLayout : nextProps.layout, // We need to save these props to state for using // getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender) children: nextProps.children,