@@ -18,7 +18,7 @@ import { sameTypeMap, UICompBuilder, withDefault } from "comps/generators";
1818import { addMapChildAction } from "comps/generators/sameTypeMap" ;
1919import { NameConfigHidden , withExposingConfigs } from "comps/generators/withExposing" ;
2020import { NameGenerator } from "comps/utils" ;
21- import { Section , controlItem , sectionNames } from "lowcoder-design" ;
21+ import { ScrollBar , Section , controlItem , sectionNames } from "lowcoder-design" ;
2222import { HintPlaceHolder } from "lowcoder-design" ;
2323import _ from "lodash" ;
2424import React , { useEffect } from "react" ;
@@ -95,6 +95,7 @@ const childrenMap = {
9595 matchColumnsHeight : withDefault ( BoolControl , true ) ,
9696 style : styleControl ( ResponsiveLayoutRowStyle , 'style' ) ,
9797 columnStyle : styleControl ( ResponsiveLayoutColStyle , 'columnStyle' ) ,
98+ mainScrollbar : withDefault ( BoolControl , false ) ,
9899 animationStyle :styleControl ( AnimationStyle , 'animationStyle' ) ,
99100 columnPerRowLG : withDefault ( NumberControl , 4 ) ,
100101 columnPerRowMD : withDefault ( NumberControl , 2 ) ,
@@ -138,12 +139,15 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
138139 horizontalSpacing,
139140 animationStyle,
140141 horizontalGridCells,
142+ mainScrollbar,
143+ autoHeight
141144 } = props ;
142145
143146 return (
144147 < BackgroundColorContext . Provider value = { props . style . background } >
145148 < DisabledContext . Provider value = { props . disabled } >
146149 < div style = { { padding : style . margin , height : '100%' } } >
150+ < ScrollBar style = { { height : autoHeight ? "auto" : "100%" , margin : "0px" , padding : "0px" } } hideScrollbar = { ! mainScrollbar } >
147151 < RowWrapper
148152 $style = { style }
149153 $animationStyle = { animationStyle }
@@ -181,6 +185,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
181185 } )
182186 }
183187 </ RowWrapper >
188+ </ ScrollBar >
184189 </ div >
185190 </ DisabledContext . Provider >
186191 </ BackgroundColorContext . Provider >
@@ -214,6 +219,9 @@ export const ResponsiveLayoutBaseComp = (function () {
214219 < >
215220 < Section name = { sectionNames . layout } >
216221 { children . autoHeight . getPropertyView ( ) }
222+ { ( ! children . autoHeight . getView ( ) ) && children . mainScrollbar . propertyView ( {
223+ label : trans ( "prop.mainScrollbar" )
224+ } ) }
217225 { children . horizontalGridCells . propertyView ( {
218226 label : trans ( 'prop.horizontalGridCells' ) ,
219227 } ) }
0 commit comments