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,