Skip to content

Commit a626975

Browse files
apply row count on canvas only
1 parent f5d21fa commit a626975

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ class GridLayout extends React.Component<GridLayoutProps, GridLayoutState> {
213213
* @return {String} Container height in pixels.
214214
*/
215215
containerHeight(): string {
216-
const { margin, rowHeight, fixedRowCount } = this.props as Required<GridLayoutProps>;
216+
const { margin, rowHeight, fixedRowCount, isCanvas } = this.props as Required<GridLayoutProps>;
217217
const { extraHeight, emptyRows } = this.props;
218218
const positionParams = genPositionParams(this.props);
219-
220219
const { containerPadding } = positionParams;
221220
const layout = this.getUILayout(undefined, true);
221+
222222
let nbRow = bottom(layout);
223-
if (!_.isNil(emptyRows) && (_.size(layout) === 0 || fixedRowCount)) {
224-
nbRow = emptyRows;// === Infinity ? 0 : emptyRows;
223+
if (!_.isNil(emptyRows) && (_.size(layout) === 0 || (fixedRowCount && isCanvas))) {
224+
nbRow = emptyRows;
225225
}
226226
const containerHeight = Math.max(
227227
nbRow * rowHeight + (nbRow - 1) * margin[1] + containerPadding[1] * 2

0 commit comments

Comments
 (0)