@@ -29,7 +29,7 @@ const EventOptions = [
29
29
{ label : trans ( "modalComp.close" ) , value : "close" , description : trans ( "modalComp.closeDesc" ) } ,
30
30
] as const ;
31
31
32
- const getStyle = ( style : ModalStyleType ) => {
32
+ const getStyle = ( style : ModalStyleType , modalScrollbar : boolean ) => {
33
33
return css `
34
34
.ant-modal-content {
35
35
border-radius: ${ style . radius } ;
@@ -49,6 +49,9 @@ const getStyle = (style: ModalStyleType) => {
49
49
background-color: ${ style . background } ;
50
50
}
51
51
}
52
+ div.ant-modal-body div.react-grid-layout::-webkit-scrollbar {
53
+ display: ${ modalScrollbar ? "block" : "none" } ;
54
+ }
52
55
.ant-modal-close {
53
56
inset-inline-end: 10px !important;
54
57
top: 10px;
@@ -80,8 +83,8 @@ function extractMarginValues(style: ModalStyleType) {
80
83
return valuesarray ;
81
84
}
82
85
83
- const ModalStyled = styled . div < { $style : ModalStyleType } > `
84
- ${ ( props ) => props . $style && getStyle ( props . $style ) }
86
+ const ModalStyled = styled . div < { $style : ModalStyleType , $modalScrollbar : boolean } > `
87
+ ${ ( props ) => props . $style && getStyle ( props . $style , props . $modalScrollbar ) }
85
88
` ;
86
89
87
90
const ModalWrapper = styled . div `
@@ -105,6 +108,7 @@ let TmpModalComp = (function () {
105
108
autoHeight : AutoHeightControl ,
106
109
title : StringControl ,
107
110
titleAlign : HorizontalAlignmentControl ,
111
+ modalScrollbar : withDefault ( BoolControl , false ) ,
108
112
style : styleControl ( ModalStyle ) ,
109
113
maskClosable : withDefault ( BoolControl , true ) ,
110
114
showMask : withDefault ( BoolControl , true ) ,
@@ -174,7 +178,7 @@ let TmpModalComp = (function () {
174
178
if ( open ) props . onEvent ( "open" ) ;
175
179
} }
176
180
zIndex = { Layers . modal }
177
- modalRender = { ( node ) => < ModalStyled $style = { props . style } > { node } </ ModalStyled > }
181
+ modalRender = { ( node ) => < ModalStyled $style = { props . style } $modalScrollbar = { props . modalScrollbar } > { node } </ ModalStyled > }
178
182
mask = { props . showMask }
179
183
className = { props . className as string }
180
184
data-testid = { props . dataTestId as string }
@@ -203,6 +207,10 @@ let TmpModalComp = (function () {
203
207
label : trans ( 'prop.horizontalGridCells' ) ,
204
208
} ) }
205
209
{ children . autoHeight . getPropertyView ( ) }
210
+ { ! children . autoHeight . getView ( ) &&
211
+ children . modalScrollbar . propertyView ( {
212
+ label : trans ( "prop.modalScrollbar" )
213
+ } ) }
206
214
{ ! children . autoHeight . getView ( ) &&
207
215
children . height . propertyView ( {
208
216
label : trans ( "modalComp.modalHeight" ) ,
0 commit comments