File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ export default class ModalPortal extends Component {
91
91
this . focusAfterRender = focus ;
92
92
}
93
93
94
+ setOverlayRef = ( overlay ) => {
95
+ this . overlay = overlay ;
96
+ }
97
+
98
+ setContentRef = ( content ) => {
99
+ this . content = content ;
100
+ }
101
+
94
102
afterClose = ( ) => {
95
103
focusManager . returnFocus ( ) ;
96
104
focusManager . teardownScopedFocus ( ) ;
@@ -209,12 +217,12 @@ export default class ModalPortal extends Component {
209
217
210
218
return this . shouldBeClosed ( ) ? < div /> : (
211
219
< div
212
- ref = { overlay => { this . overlay = overlay ; } }
220
+ ref = { this . setOverlayRef }
213
221
className = { this . buildClassName ( 'overlay' , overlayClassName ) }
214
222
style = { { ...overlayStyles , ...this . props . style . overlay } }
215
223
onClick = { this . handleOverlayOnClick } >
216
224
< div
217
- ref = { content => { this . content = content ; } }
225
+ ref = { this . setContentRef }
218
226
style = { { ...contentStyles , ...this . props . style . content } }
219
227
className = { this . buildClassName ( 'content' , className ) }
220
228
tabIndex = "-1"
You can’t perform that action at this time.
0 commit comments