Skip to content

Commit

Permalink
[SwipeableDrawer] Improve Preact support (#19782)
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyJackson85 committed Feb 19, 2020
1 parent aaebeaa commit 7a24f67
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,6 @@ const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(props, ref) {
backdropRef.current = ReactDOM.findDOMNode(instance);
}, []);

const handlePaperRef = React.useCallback(instance => {
// #StrictMode ready
paperRef.current = ReactDOM.findDOMNode(instance);
}, []);

return (
<React.Fragment>
<Drawer
Expand All @@ -527,7 +522,7 @@ const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(props, ref) {
pointerEvents: variant === 'temporary' && !open ? 'none' : '',
...PaperProps.style,
},
ref: handlePaperRef,
ref: paperRef,
}}
anchor={anchor}
transitionDuration={calculatedDurationRef.current || transitionDuration}
Expand Down

0 comments on commit 7a24f67

Please sign in to comment.