File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const Drawer: React.FC<DrawerProps> = props => {
2525 prefixCls,
2626 afterOpenChange,
2727 destroyOnClose,
28+ mask,
2829 } = props ;
2930
3031 const [ animatedVisible , setAnimatedVisible ] = React . useState ( false ) ;
@@ -57,7 +58,7 @@ const Drawer: React.FC<DrawerProps> = props => {
5758 open = { open || forceRender || animatedVisible }
5859 autoDestroy = { false }
5960 getContainer = { getContainer }
60- autoLock = { open || animatedVisible }
61+ autoLock = { mask && ( open || animatedVisible ) }
6162 >
6263 < DrawerPopup { ...sharedDrawerProps } inline = { getContainer === false } />
6364 </ Portal >
Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ describe('rc-drawer-menu', () => {
131131 const drawer = document . querySelector ( '.rc-drawer' ) ;
132132 expect ( drawer ) . toBeTruthy ( ) ;
133133 expect ( document . body . contains ( drawer ) ) . toBeTruthy ( ) ;
134- expect ( document . body . style . overflow ) . toBe ( '' ) ;
134+ expect ( document . body ) . not . toHaveStyle ( {
135+ overflowY : 'hidden' ,
136+ } ) ;
135137 unmount ( ) ;
136138 } ) ;
137139
You can’t perform that action at this time.
0 commit comments