Skip to content

Commit c3454f3

Browse files
Merge pull request #1747 from kamalqureshi/hide_column_layout
Column Hide Toggle in Responsive Layout
2 parents 2dedc8f + 54b6d24 commit c3454f3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
Option,
3131
WidthIcon,
3232
ImageCompIcon,
33+
CloseEyeIcon,
3334
} from "lowcoder-design";
3435
import styled from "styled-components";
3536
import { lastValueIfEqual } from "util/objectUtils";
@@ -608,6 +609,7 @@ const ColumnOption = new MultiCompBuilder(
608609
radius: withDefault(RadiusControl, ""),
609610
margin: withDefault(StringControl, ""),
610611
padding: withDefault(StringControl, ""),
612+
hidden: withDefault(BoolCodeControl, false),
611613
},
612614
(props) => props
613615
)
@@ -644,6 +646,10 @@ const ColumnOption = new MultiCompBuilder(
644646
preInputNode: <StyledIcon as={CompressIcon} title="" />,
645647
placeholder: '3px',
646648
})}
649+
{children.hidden.propertyView({
650+
label: trans('style.hideColumn'),
651+
preInputNode: <StyledIcon as={CloseEyeIcon} title="" />
652+
})}
647653
</StyledContent>
648654
))
649655
.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)