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
show tooltips for func overlay without transition #5631
show tooltips for func overlay without transition #5631
Conversation
I think this will need to target the bs5 branch since it's breaking behavior. |
I'm tempted to call this a bug fix...do you think anyone would be depending on the tooltip not working without a transition? I guess someone might be using it to toggle visibility? |
I was initially thinking people were using the |
We can always revert if it causes a problem |
src/Overlay.tsx
Outdated
@@ -205,6 +205,7 @@ function Overlay({ | |||
...overlayProps, | |||
placement, | |||
show, | |||
className: !transition && show && 'show', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
className: !transition && show && 'show', | |
...(!transition && show && { className: 'show' }), |
This change will avoid overwriting className
when transition is true and spreading props after a className is declared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overlayProps
won't contain the className
if overlay
is a function? The className
will probably be hard-coded in the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no className
in the overlayProps
. This is what's passed back from react-overlays:
The above suggestion will prevent the below className="abc"
from being overwritten when transition=true
.
(props) => <Tooltip className="abc" {...props}>my tooltip</Tooltip
@jquense Not that many in fact 😄 |
Thanks! |
#5621
How about this? The user will have to add the classes himself when he is using a function
overlay