@@ -119,13 +119,8 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
119
119
}
120
120
121
121
public componentDidUpdate ( prevProps : IDrawerChildProps ) {
122
- const {
123
- open,
124
- getContainer,
125
- scrollLocker,
126
- showMask,
127
- autoFocus,
128
- } = this . props ;
122
+ const { open, getContainer, scrollLocker, showMask, autoFocus } =
123
+ this . props ;
129
124
const container = getContainer && getContainer ( ) ;
130
125
if ( open !== prevProps . open ) {
131
126
if ( container && container . parentNode === document . body ) {
@@ -232,10 +227,8 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
232
227
233
228
private openLevelTransition = ( ) => {
234
229
const { open, width, height } = this . props ;
235
- const {
236
- isHorizontal,
237
- placementName,
238
- } = this . getHorizontalBoolAndPlacementName ( ) ;
230
+ const { isHorizontal, placementName } =
231
+ this . getHorizontalBoolAndPlacementName ( ) ;
239
232
const contentValue = this . contentDom
240
233
? this . contentDom . getBoundingClientRect ( ) [
241
234
isHorizontal ? 'width' : 'height'
@@ -530,7 +523,7 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
530
523
} ) ;
531
524
return (
532
525
< div
533
- { ...omit ( props , [ 'switchScrollingEffect' ] ) }
526
+ { ...omit ( props , [ 'switchScrollingEffect' , 'autoFocus' ] ) }
534
527
tabIndex = { - 1 }
535
528
className = { wrapperClassName }
536
529
style = { style }
@@ -567,7 +560,7 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
567
560
className = { `${ prefixCls } -content` }
568
561
ref = { c => {
569
562
this . contentDom = c as HTMLElement ;
570
- } }
563
+ } }
571
564
>
572
565
{ children }
573
566
</ div >
0 commit comments