Commit 93586491 by Johannes Schill

panel-header: Unmount popper when not needed.

parent 362ee894
......@@ -36,7 +36,7 @@ class Popper extends PureComponent<Props> {
</div>
)}
</Reference>
<Transition in={show} timeout={100}>
<Transition in={show} timeout={100} mountOnEnter={true} unmountOnExit={true}>
{transitionState => (
<ReactPopper placement={placement}>
{({ ref, style, placement, arrowProps }) => {
......
......@@ -12,27 +12,5 @@ exports[`Popover renders correctly 1`] = `
Button with Popover
</button>
</div>
<div
className="popper"
style={
Object {
"left": 0,
"opacity": 0,
"pointerEvents": "none",
"position": "absolute",
"top": 0,
"transition": "opacity 200ms linear",
}
}
>
<div
className="popper__background"
>
Popover text
<div
className="popper__arrow"
/>
</div>
</div>
</div>
`;
......@@ -15,27 +15,5 @@ exports[`Tooltip renders correctly 1`] = `
Link with tooltip
</a>
</div>
<div
className="popper"
style={
Object {
"left": 0,
"opacity": 0,
"pointerEvents": "none",
"position": "absolute",
"top": 0,
"transition": "opacity 200ms linear",
}
}
>
<div
className="popper__background"
>
Tooltip text
<div
className="popper__arrow"
/>
</div>
</div>
</div>
`;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment