Skip to content

Commit f23c309

Browse files
committed
Added hide toggle for columns in responsive layout
1 parent f589510 commit f23c309

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
234234
{columns.map((column) => {
235235
const id = String(column.id);
236236
const childDispatch = wrapDispatch(wrapDispatch(dispatch, "containers"), id);
237-
if (!containers[id]) return null;
237+
if (!containers[id] || column.hidden) return null;
238238
const containerProps = containers[id].children;
239239

240240
// Use the actual minWidth from column configuration instead of calculated width

client/packages/lowcoder/src/comps/controls/optionsControl.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ const ColumnOption = new MultiCompBuilder(
588588
radius: withDefault(RadiusControl, ""),
589589
margin: withDefault(StringControl, ""),
590590
padding: withDefault(StringControl, ""),
591+
hidden: withDefault(BoolControl, false),
591592
},
592593
(props) => props
593594
)
@@ -624,6 +625,9 @@ const ColumnOption = new MultiCompBuilder(
624625
preInputNode: <StyledIcon as={CompressIcon} title="" />,
625626
placeholder: '3px',
626627
})}
628+
{children.hidden.propertyView({
629+
label: trans('style.hideColumn'),
630+
})}
627631
</StyledContent>
628632
))
629633
.build();

translations/locales/en.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ export const en = {
589589
"chartBorderColor": "Border Color",
590590
"chartTextColor": "Text Color",
591591
"detailSize": "Detail Size",
592+
"hideColumn": "Hide Column",
592593

593594
"radiusTip": "Specifies the radius of the element's corners. Example: 5px, 50%, or 1em.",
594595
"gapTip": "Specifies the gap between rows and columns in a grid or flex container. Example: 10px, 1rem, or 5%.",

0 commit comments

Comments
 (0)