Skip to content

Commit 9047441

Browse files
authored
Merge pull request #311 from aaron1604/fix-container-height-reset-on-child-delete
fix: container height fix on child delete
2 parents d9df265 + 08a6e05 commit 9047441

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/packages/lowcoder/src/layout/gridLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class GridLayout extends React.Component<GridLayoutProps, GridLayoutState> {
147147
);
148148
// log.debug("layout: getDrivedState. nextProps: ", nextProps.layout, " prevState: ", prevState.layout, " newLayoutBase: ", newLayoutBase, " newLayout: ", newLayout);
149149
return {
150-
layout: draggingUtils.isDragging() ? newLayout : nextProps.layout,
150+
layout: draggingUtils.isDragging() || !childrenEqual(nextProps.children, prevState.children) ? newLayout : nextProps.layout,
151151
// We need to save these props to state for using
152152
// getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender)
153153
children: nextProps.children,

0 commit comments

Comments
 (0)