Skip to content

Commit 9f8d867

Browse files
committed
scrollbar added to container
1 parent 69ddd0a commit 9f8d867

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function convertOldContainerParams(params: CompParams<any>) {
8181
// old params
8282
if (container && (container.hasOwnProperty("layout") || container.hasOwnProperty("items"))) {
8383
const autoHeight = tempParams.value.autoHeight;
84-
const scrollbars = tempParams.value.scrollbars;
84+
const scrollbars = tempParams.value.showVerticalScrollbar;
8585
return {
8686
...tempParams,
8787
value: {

client/packages/lowcoder/src/comps/comps/triContainerComp/triContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function TriContainer(props: TriContainerProps) {
107107
const { showHeader, showFooter } = container;
108108
// When the header and footer are not displayed, the body must be displayed
109109
const showBody = container.showBody || (!showHeader && !showFooter);
110-
const scrollbars = container.scrollbars;
110+
const showVerticalScrollbar = container.showVerticalScrollbar;
111111

112112
const { items: headerItems, ...otherHeaderProps } = container.header;
113113
const { items: bodyItems, ...otherBodyProps } = container.body["0"].children.view.getView();
@@ -150,7 +150,7 @@ export function TriContainer(props: TriContainerProps) {
150150
)}
151151
{showBody && (
152152
<BackgroundColorContext.Provider value={bodyStyle.background}>
153-
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
153+
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={!showVerticalScrollbar} overflow={container.autoHeight?'hidden':'scroll'}>
154154
<BodyInnerGrid
155155
$showBorder={showHeader}
156156
{...otherBodyProps}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const childrenMap = {
4040
showBody: BoolControl.DEFAULT_TRUE,
4141
showFooter: BoolControl,
4242
autoHeight: AutoHeightControl,
43-
scrollbars: withDefault(BoolControl, false),
43+
showVerticalScrollbar: withDefault(BoolControl, false),
4444
style: withDefault(styleControl(ContainerStyle, 'style'),{borderWidth:'1px'}),
4545
headerStyle: styleControl(ContainerHeaderStyle, 'headerStyle'),
4646
bodyStyle: styleControl(ContainerBodyStyle, 'bodyStyle'),
@@ -136,7 +136,7 @@ export class TriContainerComp extends TriContainerBaseComp implements IContainer
136136
heightPropertyView() {
137137
return [
138138
this.children.autoHeight.getPropertyView(),
139-
(!this.children.autoHeight.getView()) && this.children.scrollbars.propertyView({ label: trans("prop.scrollbar") })
139+
(!this.children.autoHeight.getView()) && this.children.showVerticalScrollbar.propertyView({ label: trans("prop.showVerticalScrollbar") })
140140
];
141141
}
142142

0 commit comments

Comments
 (0)