@@ -105,6 +105,7 @@ let TmpModalComp = (function () {
105105 style : styleControl ( ModalStyle ) ,
106106 maskClosable : withDefault ( BoolControl , true ) ,
107107 showMask : withDefault ( BoolControl , true ) ,
108+ toggleClose :withDefault ( BoolControl , true )
108109 } ,
109110 ( props , dispatch ) => {
110111 const userViewMode = useUserViewMode ( ) ;
@@ -147,6 +148,7 @@ let TmpModalComp = (function () {
147148 < BackgroundColorContext . Provider value = { props . style . background } >
148149 < ModalWrapper >
149150 < StyledModal
151+ closable = { props . toggleClose }
150152 height = { height }
151153 resizeHandles = { resizeHandles }
152154 onResizeStop = { onResizeStop }
@@ -160,10 +162,10 @@ let TmpModalComp = (function () {
160162 $titleAlign = { props . titleAlign }
161163 width = { width }
162164 onCancel = { ( e ) => {
163- props . visible . onChange ( false ) ;
165+ props . toggleClose && props . visible . onChange ( false ) ;
164166 } }
165167 afterClose = { ( ) => {
166- props . onEvent ( "close" ) ;
168+ props . toggleClose && props . onEvent ( "close" ) ;
167169 } }
168170 zIndex = { Layers . modal }
169171 modalRender = { ( node ) => < ModalStyled $style = { props . style } > { node } </ ModalStyled > }
@@ -208,6 +210,9 @@ let TmpModalComp = (function () {
208210 { children . showMask . propertyView ( {
209211 label : trans ( "prop.showMask" ) ,
210212 } ) }
213+ { children . toggleClose . propertyView ( {
214+ label : trans ( "prop.toggleClose" ) ,
215+ } ) }
211216 </ Section >
212217 < Section name = { sectionNames . interaction } > { children . onEvent . getPropertyView ( ) } </ Section >
213218 < Section name = { sectionNames . style } > { children . style . getPropertyView ( ) } </ Section >
0 commit comments