diff --git a/src/components/Drawer.tsx b/src/components/Drawer.tsx index 6b886175b..8a1b8c29a 100644 --- a/src/components/Drawer.tsx +++ b/src/components/Drawer.tsx @@ -108,11 +108,11 @@ export class Drawer extends React.Component { @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() {