Commit e979ed14 by Johannes Schill

panel-header: Unmount popper when not needed.

parent 9e9ce807
...@@ -36,7 +36,7 @@ class Popper extends PureComponent<Props> { ...@@ -36,7 +36,7 @@ class Popper extends PureComponent<Props> {
</div> </div>
)} )}
</Reference> </Reference>
<Transition in={show} timeout={100}> <Transition in={show} timeout={100} mountOnEnter={true} unmountOnExit={true}>
{transitionState => ( {transitionState => (
<ReactPopper placement={placement}> <ReactPopper placement={placement}>
{({ ref, style, placement, arrowProps }) => { {({ ref, style, placement, arrowProps }) => {
......
...@@ -12,27 +12,5 @@ exports[`Popover renders correctly 1`] = ` ...@@ -12,27 +12,5 @@ exports[`Popover renders correctly 1`] = `
Button with Popover Button with Popover
</button> </button>
</div> </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> </div>
`; `;
...@@ -15,27 +15,5 @@ exports[`Tooltip renders correctly 1`] = ` ...@@ -15,27 +15,5 @@ exports[`Tooltip renders correctly 1`] = `
Link with tooltip Link with tooltip
</a> </a>
</div> </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> </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