Skip to content

Commit e9ebbcf

Browse files
small updates
1 parent 031ac84 commit e9ebbcf

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

client/packages/lowcoder/src/comps/comps/containerComp/containerView.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,13 @@ export const InnerGrid = React.memo((props: ViewPropsWithSelect) => {
348348

349349
// Falk: TODO: Here we can define the inner grid columns dynamically
350350
//Added By Aqib Mirza
351-
const defaultGrid =
352-
horizontalGridCells ||
351+
const defaultGrid = useMemo(() => {
352+
return horizontalGridCells ||
353353
currentTheme?.gridColumns ||
354354
defaultTheme?.gridColumns ||
355355
"12";
356+
}, [horizontalGridCells, currentTheme?.gridColumns, defaultTheme?.gridColumns]);
357+
356358
/////////////////////
357359
const isDroppable =
358360
useContext(IsDroppable) && (_.isNil(props.isDroppable) || props.isDroppable) && !readOnly;

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ export const GridItem = React.memo((props: GridItemProps) => {
207207
[xx, yy] = [xy.x, xy.y];
208208
}
209209
}
210+
210211
setResizing(handlerName === "onResizeStop" ? undefined : size);
211212
setDragging(handlerName === "onResizeStop" ? undefined : localDragging);
212213

@@ -517,7 +518,16 @@ export const GridItem = React.memo((props: GridItemProps) => {
517518
left = position.left;
518519
}
519520
return { width, height, top, left };
520-
}, [dragging, position.height, position.left, position.top, position.width, resizing]);
521+
}, [
522+
dragging?.top,
523+
dragging?.left,
524+
position.height,
525+
position.left,
526+
position.top,
527+
position.width,
528+
resizing?.width,
529+
resizing?.height,
530+
]);
521531

522532
const { isDraggable, isResizable, layoutHide, children, isSelected, clickItem, zIndex } = props;
523533

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy