improve clicking outside

This commit is contained in:
SrGooglo 2023-06-19 19:19:53 +00:00
parent a69e09a2ba
commit bc6ba377da

View File

@ -344,8 +344,14 @@ export default class Drawer extends Component {
}
// check if is clicking outside main component
if (this.drawer && !this.drawer.contains(event.target)) {
this.props.onRequestClose(this)
if (this.drawer && event.target?.className) {
if (event.target.className.includes("ant-cascader") || event.target.className.includes("ant-select")) {
return false
}
if (!this.drawer.contains(event.target)) {
this.props.onRequestClose(this)
}
}
}