Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: popup shift to left in the first render when set strech property to trigger #420

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ export function generateTrigger(
useLayoutEffect(
(firstMount) => {
if (!firstMount || mergedOpen) {
if (stretch) {
// delay setting makes it calculate
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

避免 setTimeout,另外还是没有 test case 👻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello,这个测试用例要用来测试这个bug是否出现吗,还是另外的作用呢

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

测试是否修复 bug

Copy link
Member

@zombieJ zombieJ Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外,这个修复不稳定:
Kapture 2023-08-23 at 09 50 11

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外,这个修复不稳定: Kapture 2023-08-23 at 09 50 11

对的,我改了一下,在写测试用例

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边有个时序在 CSSMotion 里已经做过了,加个 钉钉 群不~~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,怎么加?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加这个群,然后我加你好友拉进 v5 群~

setInMotion(true);
}, 0);
return;
}
setInMotion(true);
}
},
Expand Down