@@ -29,7 +29,7 @@ const EventOptions = [
2929 { label : trans ( "modalComp.close" ) , value : "close" , description : trans ( "modalComp.closeDesc" ) } ,
3030] as const ;
3131
32- const getStyle = ( style : ModalStyleType ) => {
32+ const getStyle = ( style : ModalStyleType , modalScrollbar : boolean ) => {
3333 return css `
3434 .ant-modal-content {
3535 border-radius: ${ style . radius } ;
@@ -49,6 +49,9 @@ const getStyle = (style: ModalStyleType) => {
4949 background-color: ${ style . background } ;
5050 }
5151 }
52+ div.ant-modal-body div.react-grid-layout::-webkit-scrollbar {
53+ display: ${ modalScrollbar ? "block" : "none" } ;
54+ }
5255 .ant-modal-close {
5356 inset-inline-end: 10px !important;
5457 top: 10px;
@@ -80,8 +83,8 @@ function extractMarginValues(style: ModalStyleType) {
8083 return valuesarray ;
8184}
8285
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 ) }
8588` ;
8689
8790const ModalWrapper = styled . div `
@@ -105,6 +108,7 @@ let TmpModalComp = (function () {
105108 autoHeight : AutoHeightControl ,
106109 title : StringControl ,
107110 titleAlign : HorizontalAlignmentControl ,
111+ modalScrollbar : withDefault ( BoolControl , false ) ,
108112 style : styleControl ( ModalStyle ) ,
109113 maskClosable : withDefault ( BoolControl , true ) ,
110114 showMask : withDefault ( BoolControl , true ) ,
@@ -174,7 +178,7 @@ let TmpModalComp = (function () {
174178 if ( open ) props . onEvent ( "open" ) ;
175179 } }
176180 zIndex = { Layers . modal }
177- modalRender = { ( node ) => < ModalStyled $style = { props . style } > { node } </ ModalStyled > }
181+ modalRender = { ( node ) => < ModalStyled $style = { props . style } $modalScrollbar = { props . modalScrollbar } > { node } </ ModalStyled > }
178182 mask = { props . showMask }
179183 className = { props . className as string }
180184 data-testid = { props . dataTestId as string }
@@ -203,6 +207,10 @@ let TmpModalComp = (function () {
203207 label : trans ( 'prop.horizontalGridCells' ) ,
204208 } ) }
205209 { children . autoHeight . getPropertyView ( ) }
210+ { ! children . autoHeight . getView ( ) &&
211+ children . modalScrollbar . propertyView ( {
212+ label : trans ( "prop.modalScrollbar" )
213+ } ) }
206214 { ! children . autoHeight . getView ( ) &&
207215 children . height . propertyView ( {
208216 label : trans ( "modalComp.modalHeight" ) ,
0 commit comments