attempt fix for popovers

This commit is contained in:
keyan 2024-07-12 10:15:57 -05:00
parent 35cf792ff8
commit cb6b85345c
2 changed files with 17 additions and 2 deletions

View File

@ -15,14 +15,21 @@ export default function ActionTooltip ({ children, notForm, disable, overlayText
<OverlayTrigger <OverlayTrigger
placement={placement || 'bottom'} placement={placement || 'bottom'}
overlay={ overlay={
<Tooltip> <Tooltip style={{ position: 'fixed' }}>
{overlayText} {overlayText}
</Tooltip> </Tooltip>
} }
trigger={['hover', 'focus']} trigger={['hover', 'focus']}
show={formik?.isSubmitting ? false : undefined} show={formik?.isSubmitting ? false : undefined}
popperConfig={{
modifiers: {
preventOverflow: {
enabled: false
}
}
}}
> >
<span> <span className='d-inline-block'>
{children} {children}
</span> </span>
</OverlayTrigger> </OverlayTrigger>

View File

@ -26,12 +26,20 @@ export default function HoverablePopover ({ id, trigger, body, onShow }) {
show={showOverlay} show={showOverlay}
placement='bottom' placement='bottom'
onHide={handleMouseLeave} onHide={handleMouseLeave}
popperConfig={{
modifiers: {
preventOverflow: {
enabled: false
}
}
}}
overlay={ overlay={
<Popover <Popover
onPointerEnter={handleMouseEnter} onPointerEnter={handleMouseEnter}
onPointerLeave={handleMouseLeave} onPointerLeave={handleMouseLeave}
onMouseLeave={handleMouseLeave} onMouseLeave={handleMouseLeave}
className={styles.HoverablePopover} className={styles.HoverablePopover}
style={{ position: 'fixed' }}
> >
<Popover.Body className={styles.HoverablePopover}> <Popover.Body className={styles.HoverablePopover}>
{body} {body}