Skip to content

Commit c74846b

Browse files
Removed handle paper ref call back, and replaced handle paper ref in drawer with paper ref.
1 parent 08e7bf5 commit c74846b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,6 @@ const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(props, ref) {
504504
backdropRef.current = ReactDOM.findDOMNode(instance);
505505
}, []);
506506

507-
const handlePaperRef = React.useCallback(instance => {
508-
// #StrictMode ready
509-
paperRef.current = ReactDOM.findDOMNode(instance);
510-
}, []);
511-
512507
return (
513508
<React.Fragment>
514509
<Drawer
@@ -527,7 +522,7 @@ const SwipeableDrawer = React.forwardRef(function SwipeableDrawer(props, ref) {
527522
pointerEvents: variant === 'temporary' && !open ? 'none' : '',
528523
...PaperProps.style,
529524
},
530-
ref: handlePaperRef,
525+
ref: paperRef,
531526
}}
532527
anchor={anchor}
533528
transitionDuration={calculatedDurationRef.current || transitionDuration}

0 commit comments

Comments
 (0)