Skip to content

Commit

Permalink
fix: align with shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jun 2, 2023
1 parent e76b760 commit 9c26c46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"rc-align": "^4.0.0",
"rc-motion": "^2.0.0",
"rc-resize-observer": "^1.3.1",
"rc-util": "^5.31.1"
"rc-util": "^5.33.0"
},
"peerDependencies": {
"react": ">=16.9.0",
Expand Down
6 changes: 2 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,11 @@ export function generateTrigger(

// ========================== Motion ============================
const [inMotion, setInMotion] = React.useState(false);
const mountRef = React.useRef(true);

useLayoutEffect(() => {
if (!mountRef.current || mergedOpen) {
useLayoutEffect((firstMount) => {
if (!firstMount || mergedOpen) {
setInMotion(true);
}
mountRef.current = true;
}, [mergedOpen]);

const [motionPrepareResolve, setMotionPrepareResolve] =
Expand Down

0 comments on commit 9c26c46

Please sign in to comment.