fix: stop propagation when drawer is opened

This commit is contained in:
chenos 2022-04-18 10:43:29 +08:00
parent e21d819155
commit 4510242651
2 changed files with 69 additions and 61 deletions

View File

@ -21,6 +21,11 @@ export const ActionDrawer: ComposedActionDrawer = observer((props) => {
return (
<>
{createPortal(
<div
onClick={(e) => {
e.stopPropagation();
}}
>
<Drawer
width={'50%'}
title={field.title}
@ -81,7 +86,8 @@ export const ActionDrawer: ComposedActionDrawer = observer((props) => {
return s['x-component'] !== footerNodeName;
}}
/>
</Drawer>,
</Drawer>
</div>,
document.body,
)}
</>

View File

@ -27,7 +27,9 @@ export const ReadPrettyRecordPicker: React.FC = observer((props: any) => {
return (
<span>
<a
onClick={() => {
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
setVisible(true);
setRecord(record);
}}