mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:19:01 +08:00
没有显示的时候不要调用 onHide
This commit is contained in:
parent
7bacf2df39
commit
aa6d38600b
@ -108,11 +108,11 @@ export class Drawer extends React.Component<DrawerProps, DrawerState> {
|
||||
|
||||
@autobind
|
||||
handleRootClick(e: MouseEvent) {
|
||||
const {classPrefix: ns, closeOnOutside, onHide} = this.props;
|
||||
const {classPrefix: ns, closeOnOutside, onHide, show} = this.props;
|
||||
if ((e.target as HTMLElement).closest(`.${ns}Drawer-content`)) {
|
||||
return;
|
||||
}
|
||||
closeOnOutside && onHide && onHide();
|
||||
closeOnOutside && show && onHide && onHide();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user