Skip to content

Commit

Permalink
Fixed positioning issue in Popover
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Bartlett committed Apr 23, 2019
1 parent fbe4b09 commit c1c7d1d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,14 @@ class Popover extends Component {
this.setState({
open: true,
closing: false,
});
setPlacement: false,
}, () => {
setTimeout(() => {
this.setState({
setPlacement: true,
})
})
});
} else {
if (nextProps.animated) {
if (this.timeout !== null) return;
Expand Down Expand Up @@ -213,7 +220,10 @@ class Popover extends Component {
...other
} = this.props;

let styleRoot = style;
let styleRoot = {
...style,
opacity: this.state.setPlacement ? 1 : 0,
};

if (!animated) {
styleRoot = {
Expand Down

0 comments on commit c1c7d1d

Please sign in to comment.