@@ -18,7 +18,7 @@ import { sameTypeMap, UICompBuilder, withDefault } from "comps/generators";
18
18
import { addMapChildAction } from "comps/generators/sameTypeMap" ;
19
19
import { NameConfigHidden , withExposingConfigs } from "comps/generators/withExposing" ;
20
20
import { NameGenerator } from "comps/utils" ;
21
- import { Section , controlItem , sectionNames } from "lowcoder-design" ;
21
+ import { ScrollBar , Section , controlItem , sectionNames } from "lowcoder-design" ;
22
22
import { HintPlaceHolder } from "lowcoder-design" ;
23
23
import _ from "lodash" ;
24
24
import React , { useEffect } from "react" ;
@@ -95,6 +95,7 @@ const childrenMap = {
95
95
matchColumnsHeight : withDefault ( BoolControl , true ) ,
96
96
style : styleControl ( ResponsiveLayoutRowStyle , 'style' ) ,
97
97
columnStyle : styleControl ( ResponsiveLayoutColStyle , 'columnStyle' ) ,
98
+ mainScrollbar : withDefault ( BoolControl , false ) ,
98
99
animationStyle :styleControl ( AnimationStyle , 'animationStyle' ) ,
99
100
columnPerRowLG : withDefault ( NumberControl , 4 ) ,
100
101
columnPerRowMD : withDefault ( NumberControl , 2 ) ,
@@ -138,12 +139,15 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
138
139
horizontalSpacing,
139
140
animationStyle,
140
141
horizontalGridCells,
142
+ mainScrollbar,
143
+ autoHeight
141
144
} = props ;
142
145
143
146
return (
144
147
< BackgroundColorContext . Provider value = { props . style . background } >
145
148
< DisabledContext . Provider value = { props . disabled } >
146
149
< div style = { { padding : style . margin , height : '100%' } } >
150
+ < ScrollBar style = { { height : autoHeight ? "auto" : "100%" , margin : "0px" , padding : "0px" } } hideScrollbar = { ! mainScrollbar } >
147
151
< RowWrapper
148
152
$style = { style }
149
153
$animationStyle = { animationStyle }
@@ -181,6 +185,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
181
185
} )
182
186
}
183
187
</ RowWrapper >
188
+ </ ScrollBar >
184
189
</ div >
185
190
</ DisabledContext . Provider >
186
191
</ BackgroundColorContext . Provider >
@@ -214,6 +219,9 @@ export const ResponsiveLayoutBaseComp = (function () {
214
219
< >
215
220
< Section name = { sectionNames . layout } >
216
221
{ children . autoHeight . getPropertyView ( ) }
222
+ { ( ! children . autoHeight . getView ( ) ) && children . mainScrollbar . propertyView ( {
223
+ label : trans ( "prop.mainScrollbar" )
224
+ } ) }
217
225
{ children . horizontalGridCells . propertyView ( {
218
226
label : trans ( 'prop.horizontalGridCells' ) ,
219
227
} ) }
0 commit comments