Skip to content

Commit

Permalink
Remove ref function
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Apr 9, 2019
1 parent 1808adb commit c4f745a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/material-ui/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ function Tooltip(props) {
};
});

const onRootRef = ref => {
childrenRef.current = ref;
};

const handleOpen = event => {
// The mouseover event will trigger for every nested element in the tooltip.
// We can skip rerendering when the tooltip is already open.
Expand Down Expand Up @@ -328,7 +324,7 @@ function Tooltip(props) {

return (
<React.Fragment>
<RootRef rootRef={onRootRef}>{React.cloneElement(children, childrenProps)}</RootRef>
<RootRef rootRef={childrenRef}>{React.cloneElement(children, childrenProps)}</RootRef>
<Popper
className={clsx(classes.popper, {
[classes.popperInteractive]: interactive,
Expand Down

0 comments on commit c4f745a

Please sign in to comment.