Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d11a347

Browse files
committed
[Fix]: #1233 able to click outside even mask is off
1 parent 18d3e40 commit d11a347

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎client/packages/lowcoder/src/comps/hooks/drawerComp.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ const DrawerView = React.memo((
217217
body: {
218218
padding: 0,
219219
background: props.style.background
220-
}
221-
}), [props.style.background]);
220+
},
221+
mask: props.showMask ? undefined : { background: "transparent" }
222+
}), [props.style.background, props.showMask]);
222223

223224
const rootStyle = useMemo(() =>
224225
props.visible.value ? { overflow: "auto", pointerEvents: "auto" } : {},
@@ -232,7 +233,7 @@ const DrawerView = React.memo((
232233
resizable={resizable}
233234
onResizeStop={onResizeStop}
234235
rootStyle={rootStyle as any}
235-
styles={drawerStyles}
236+
styles={drawerStyles as any}
236237
title={props.title}
237238
$titleAlign={props.titleAlign}
238239
$drawerScrollbar={props.drawerScrollbar}
@@ -248,7 +249,7 @@ const DrawerView = React.memo((
248249
afterOpenChange={afterOpenChange}
249250
zIndex={Layers.drawer}
250251
maskClosable={props.maskClosable}
251-
mask={props.showMask}
252+
mask={true}
252253
className={clsx(`app-${appID}`, props.className)}
253254
data-testid={props.dataTestId as string}
254255
>

0 commit comments

Comments
 (0)