New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controlled popover with buttons interfered by legacy behavior #1388
Labels
Comments
My solution is to access the ref of It was inconvenience that we can't access I end up with something like this: const Popover = React.forwardRef((props, ref) => {
const { className, innerClassName } = props;
const popperClasses = classNames('popover', 'show', className);
const classes = classNames('popover-inner', innerClassName);
return (
<TooltipPopoverWrapper
{...props}
ref={ref}
className={popperClasses}
innerClassName={classes}
/>
);
}); Note that the code only work for v7.1.0 |
We should probably check if the popover is already open before setting the delay to open it. |
12 tasks
michaelmulley
pushed a commit
to elsevier-research/reactstrap
that referenced
this issue
Apr 4, 2019
lxcid
pushed a commit
to taskade/reactstrap
that referenced
this issue
Aug 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Popover
#7.1.0
es
#16.6.0
#4.2.1
What is happening?
If I have controlled popover with its trigger set to
legacy
and try to add the dismiss button (that toggled theisOpen
state),showWithDelay()
get trigged byhandleDocumentClick()
.reactstrap/src/TooltipPopoverWrapper.js
Lines 195 to 206 in ee15c86
Because this is delayed, it get executed after we already manually toggled ourselves.
e.preventDefault()
ore.stopPropagation()
doesn't work becauseuseCapture
is set to true thus overriding the normal event bubbling steps…reactstrap/src/TooltipPopoverWrapper.js
Line 226 in ee15c86
This behavior cause the popover to get reopened.
What should be happening?
Legacy popover should work with controlled component with buttons in the popover body.
The text was updated successfully, but these errors were encountered: