@@ -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 { ScrollBar , Section , controlItem , sectionNames } from "lowcoder-design" ;
21
+ import { 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" ;
@@ -47,6 +47,7 @@ import SliderControl from "@lowcoder-ee/comps/controls/sliderControl";
47
47
const RowWrapper = styled ( Row ) < {
48
48
$style : ResponsiveLayoutRowStyleType ;
49
49
$animationStyle : AnimationStyleType ;
50
+ $showScrollbar :boolean
50
51
} > `
51
52
${ ( props ) => props . $animationStyle }
52
53
height: 100%;
@@ -56,8 +57,12 @@ const RowWrapper = styled(Row)<{
56
57
border-style: ${ ( props ) => props . $style ?. borderStyle } ;
57
58
padding: ${ ( props ) => props . $style . padding } ;
58
59
background-color: ${ ( props ) => props . $style . background } ;
59
- overflow-x: auto;
60
60
rotate: ${ props => props . $style . rotation }
61
+ overflow: ${ ( props ) => ( props . $showScrollbar ? 'auto' : 'hidden' ) } ;
62
+ ::-webkit-scrollbar {
63
+ display: ${ ( props ) => ( props . $showScrollbar ? 'block' : 'none' ) } ;
64
+ }
65
+
61
66
` ;
62
67
63
68
const ColWrapper = styled ( Col ) < {
@@ -147,10 +152,10 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
147
152
< BackgroundColorContext . Provider value = { props . style . background } >
148
153
< DisabledContext . Provider value = { props . disabled } >
149
154
< div style = { { padding : style . margin , height : '100%' } } >
150
- < ScrollBar style = { { height : autoHeight ? "auto" : "100%" , margin : "0px" , padding : "0px" } } hideScrollbar = { ! mainScrollbar } >
151
155
< RowWrapper
152
156
$style = { style }
153
157
$animationStyle = { animationStyle }
158
+ $showScrollbar = { mainScrollbar }
154
159
wrap = { rowBreak }
155
160
gutter = { [ horizontalSpacing , verticalSpacing ] }
156
161
>
@@ -185,7 +190,6 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
185
190
} )
186
191
}
187
192
</ RowWrapper >
188
- </ ScrollBar >
189
193
</ div >
190
194
</ DisabledContext . Provider >
191
195
</ BackgroundColorContext . Provider >
0 commit comments