mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
improve clicking outside
This commit is contained in:
parent
a69e09a2ba
commit
bc6ba377da
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user