@@ -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 { ScrollBar , Section , controlItem , sectionNames } from "lowcoder-design" ;
21+ import { Section , controlItem , sectionNames } from "lowcoder-design" ;
2222import { HintPlaceHolder } from "lowcoder-design" ;
2323import _ from "lodash" ;
2424import React , { useEffect } from "react" ;
@@ -47,6 +47,7 @@ import SliderControl from "@lowcoder-ee/comps/controls/sliderControl";
4747const RowWrapper = styled ( Row ) < {
4848 $style : ResponsiveLayoutRowStyleType ;
4949 $animationStyle : AnimationStyleType ;
50+ $showScrollbar :boolean
5051} > `
5152 ${ ( props ) => props . $animationStyle }
5253 height: 100%;
@@ -56,8 +57,12 @@ const RowWrapper = styled(Row)<{
5657 border-style: ${ ( props ) => props . $style ?. borderStyle } ;
5758 padding: ${ ( props ) => props . $style . padding } ;
5859 background-color: ${ ( props ) => props . $style . background } ;
59- overflow-x: auto;
6060 rotate: ${ props => props . $style . rotation }
61+ overflow: ${ ( props ) => ( props . $showScrollbar ? 'auto' : 'hidden' ) } ;
62+ ::-webkit-scrollbar {
63+ display: ${ ( props ) => ( props . $showScrollbar ? 'block' : 'none' ) } ;
64+ }
65+
6166` ;
6267
6368const ColWrapper = styled ( Col ) < {
@@ -147,10 +152,10 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
147152 < BackgroundColorContext . Provider value = { props . style . background } >
148153 < DisabledContext . Provider value = { props . disabled } >
149154 < div style = { { padding : style . margin , height : '100%' } } >
150- < ScrollBar style = { { height : autoHeight ? "auto" : "100%" , margin : "0px" , padding : "0px" } } hideScrollbar = { ! mainScrollbar } >
151155 < RowWrapper
152156 $style = { style }
153157 $animationStyle = { animationStyle }
158+ $showScrollbar = { mainScrollbar }
154159 wrap = { rowBreak }
155160 gutter = { [ horizontalSpacing , verticalSpacing ] }
156161 >
@@ -185,7 +190,6 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
185190 } )
186191 }
187192 </ RowWrapper >
188- </ ScrollBar >
189193 </ div >
190194 </ DisabledContext . Provider >
191195 </ BackgroundColorContext . Provider >
0 commit comments