refine popover close timing
This commit is contained in:
parent
67799a508a
commit
69916117b1
|
@ -13,7 +13,7 @@ export default function HoverablePopover ({ trigger, body, onShow }) {
|
||||||
onShow?.()
|
onShow?.()
|
||||||
timeoutId.current = setTimeout(() => setShow(true), 500)
|
timeoutId.current = setTimeout(() => setShow(true), 500)
|
||||||
} else {
|
} else {
|
||||||
timeoutId.current = setTimeout(() => setShow(!!popRef.current?.matches(':hover')), 500)
|
timeoutId.current = setTimeout(() => setShow(!!popRef.current?.matches(':hover')), 300)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@ export default function HoverablePopover ({ trigger, body, onShow }) {
|
||||||
trigger={['hover', 'focus']}
|
trigger={['hover', 'focus']}
|
||||||
show={show}
|
show={show}
|
||||||
onToggle={onToggle}
|
onToggle={onToggle}
|
||||||
delay={1}
|
transition
|
||||||
transition={false}
|
|
||||||
rootClose
|
rootClose
|
||||||
overlay={
|
overlay={
|
||||||
<Popover style={{ position: 'fixed' }} onPointerLeave={() => onToggle(false)}>
|
<Popover style={{ position: 'fixed' }} onPointerLeave={() => onToggle(false)}>
|
||||||
|
|
Loading…
Reference in New Issue