Skip to content

Commit

Permalink
Merge pull request #41 from ndelangen/fix/37
Browse files Browse the repository at this point in the history
FIX #37
  • Loading branch information
yjose authored Sep 29, 2018
2 parents 1f1b045 + 25af5f1 commit 3afd7a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ export default class Popup extends React.PureComponent {
const overlay = this.state.isOpen && !(on.indexOf("hover") >= 0);
const ovStyle = modal ? styles.overlay.modal : styles.overlay.tooltip;
return [
!!this.props.trigger && (
<Ref innerRef={this.setTriggerRef} key="R">
{this.renderTrigger()}
</Ref>
),
this.state.isOpen && (
<div
key="H"
Expand All @@ -270,11 +275,6 @@ export default class Popup extends React.PureComponent {
</div>
),
this.state.isOpen && !modal && this.renderContent(),
!!this.props.trigger && (
<Ref innerRef={this.setTriggerRef} key="R">
{this.renderTrigger()}
</Ref>
)
];
}
}
Expand Down
4 changes: 2 additions & 2 deletions stories/src/BoundedTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export default class BoundedTooltip extends React.Component {
position={this.props.position}
//open={this.state.open}
closeOnDocumentClick
keepTooltipInside={false}
keepTooltipInside={true}
// onClose={this.closeModal}
>
{close => (
<div className="modal">
<a className="close" onClick={close}>
<a className="close" onClick={close} href="#!">
&times; remove
</a>
Lorem ipsum dolor sit amet, consectur adipisicing elit. Beatae magni
Expand Down

0 comments on commit 3afd7a5

Please sign in to comment.