Skip to content

Commit a343a02

Browse files
fix: added match columns height switch
1 parent fba6a02 commit a343a02

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

client/packages/lowcoder/src/comps/comps/responsiveLayout/responsiveLayout.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ const RowWrapper = styled(Row)<{$style: ResponsiveLayoutRowStyleType}>`
4242
const ColWrapper = styled(Col)<{
4343
$style: ResponsiveLayoutColStyleType,
4444
$minWidth?: string,
45+
$matchColumnsHeight: boolean,
4546
}>`
4647
min-width: ${(props) => props.$minWidth};
4748
> div {
48-
height: 100%;
49+
height: ${(props) => props.$matchColumnsHeight ? '100%' : 'auto'};
4950
}
5051
`;
5152

@@ -58,6 +59,7 @@ const childrenMap = {
5859
}),
5960
autoHeight: AutoHeightControl,
6061
rowBreak: withDefault(BoolControl, false),
62+
matchColumnsHeight: withDefault(BoolControl, false),
6163
rowStyle: withDefault(styleControl(ResponsiveLayoutRowStyle), {}),
6264
columnStyle: withDefault(styleControl(ResponsiveLayoutColStyle), {}),
6365
columnPerRowLG: withDefault(NumberControl, 4),
@@ -91,6 +93,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
9193
containers,
9294
dispatch,
9395
rowBreak,
96+
matchColumnsHeight,
9497
rowStyle,
9598
columnStyle,
9699
columnPerRowLG,
@@ -135,6 +138,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
135138
xs={24/(noOfColumns < columnPerRowSM ? noOfColumns : columnPerRowSM)}
136139
$style={columnCustomStyle}
137140
$minWidth={column.minWidth}
141+
$matchColumnsHeight={matchColumnsHeight}
138142
>
139143
<ColumnContainer
140144
layout={containerProps.layout.getView()}
@@ -177,6 +181,9 @@ export const ResponsiveLayoutBaseComp = (function () {
177181
{children.rowBreak.propertyView({
178182
label: trans("responsiveLayout.rowBreak")
179183
})}
184+
{children.matchColumnsHeight.propertyView({
185+
label: trans("responsiveLayout.matchColumnsHeight")
186+
})}
180187
</Section>
181188
<Section name={trans("responsiveLayout.columnsPerRow")}>
182189
{children.columnPerRowLG.propertyView({

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,5 +2523,6 @@ export const en = {
25232523
columnStyle: "Column Style",
25242524
minWidth: "Min. Width",
25252525
rowBreak: "Row Break",
2526+
matchColumnsHeight: "Match Columns Height",
25262527
},
25272528
};

client/packages/lowcoder/src/i18n/locales/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,6 +2513,7 @@ timeLine: {
25132513
columnStyle: "栏目样式",
25142514
minWidth: "分钟。宽度",
25152515
rowBreak: "断行",
2516+
matchColumnsHeight: "匹配列高度",
25162517
}
25172518
};
25182519

0 commit comments

Comments
 (0)