File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 66
66
"rc-align" : " ^4.0.0" ,
67
67
"rc-motion" : " ^2.0.0" ,
68
68
"rc-resize-observer" : " ^1.3.1" ,
69
- "rc-util" : " ^5.31.1 "
69
+ "rc-util" : " ^5.33.0 "
70
70
},
71
71
"peerDependencies" : {
72
72
"react" : " >=16.9.0" ,
Original file line number Diff line number Diff line change @@ -336,13 +336,11 @@ export function generateTrigger(
336
336
337
337
// ========================== Motion ============================
338
338
const [ inMotion , setInMotion ] = React . useState ( false ) ;
339
- const mountRef = React . useRef ( true ) ;
340
339
341
- useLayoutEffect ( ( ) => {
342
- if ( ! mountRef . current || mergedOpen ) {
340
+ useLayoutEffect ( ( firstMount ) => {
341
+ if ( ! firstMount || mergedOpen ) {
343
342
setInMotion ( true ) ;
344
343
}
345
- mountRef . current = true ;
346
344
} , [ mergedOpen ] ) ;
347
345
348
346
const [ motionPrepareResolve , setMotionPrepareResolve ] =
You can’t perform that action at this time.
0 commit comments