mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
fix sidebar closes when click on a selection item
This commit is contained in:
parent
dc9d71d499
commit
482be1da77
@ -63,6 +63,10 @@ const generateItems = () => {
|
|||||||
const CustomRender = (props) => {
|
const CustomRender = (props) => {
|
||||||
const handleClickOutside = (event) => {
|
const handleClickOutside = (event) => {
|
||||||
if (props.sidebarRef.current && !props.sidebarRef.current.contains(event.target)) {
|
if (props.sidebarRef.current && !props.sidebarRef.current.contains(event.target)) {
|
||||||
|
if (event.target.closest(".ant-select-item")) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
props.closeRender()
|
props.closeRender()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user