Skip to content

Commit

Permalink
fix: fix some bugs with the refs
Browse files Browse the repository at this point in the history
  • Loading branch information
satazor committed Oct 8, 2018
1 parent 7ccbf07 commit 901a66f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/popover/PopoverTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,17 @@ export default class PopoverTrigger extends Component {
};

storeReferenceRef = (ref) => {
this.referenceNode = findDOMNode(ref);
this.reference = ref;

this.setReferenceRef && this.setReferenceRef(this.referenceNode);
this.popover && this.popover.setReferenceNode(this.referenceNode);
const referenceNode = findDOMNode(this.reference);

this.setReferenceRef && this.setReferenceRef(referenceNode);
this.popover && this.popover.setReferenceNode(referenceNode);
};

storePopoverRef = (ref) => {
this.popover = ref;
this.popover && this.popover.setReferenceNode(this.referenceNode);
this.popover && this.popover.setReferenceNode(findDOMNode(this.reference));
};

handleOpen = (delay) => {
Expand Down

0 comments on commit 901a66f

Please sign in to comment.