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

refactor: use ScrollLocker #157

Merged
merged 4 commits into from
Jan 4, 2021
Merged

refactor: use ScrollLocker #157

merged 4 commits into from
Jan 4, 2021

Conversation

shaodahong
Copy link
Member

@shaodahong shaodahong commented Dec 25, 2020

@jljsj33
Copy link
Member

jljsj33 commented Dec 25, 2020

ci 修下?

@shaodahong
Copy link
Member Author

circelci 不用了,删了就行

@jljsj33
Copy link
Member

jljsj33 commented Dec 25, 2020

刚看了下,,抽屉内部不能滑动了。。好像不能禁 document touchmove。。。

@shaodahong
Copy link
Member Author

Done.

@vercel
Copy link

vercel bot commented Dec 28, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/drawer/n73epmelv
✅ Preview: https://drawer-git-scroll-locker.react-component.vercel.app

@@ -115,35 +111,35 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
this.forceUpdate(() => {
this.domFocus();
});
this.props.scrollLocker?.lock();
Copy link
Member

Choose a reason for hiding this comment

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

strict 模式下 getDerivedStateFromProps 会调用多次,这样会不会有问题。

Copy link
Member Author

Choose a reason for hiding this comment

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

不会,lock 底层判断了,只会调一次

@afc163 afc163 merged commit f04ab33 into master Jan 4, 2021
@delete-merged-branch delete-merged-branch bot deleted the scroll-locker branch January 4, 2021 12:47
@afc163
Copy link
Member

afc163 commented Jan 4, 2021

rc-dialog 和 rc-drawer 都发了 minor,@shaodahong 到 antd 里升级和测试一下吧。

@Clago
Copy link

Clago commented Jan 5, 2021

rc-dialog 和 rc-drawer 都发了 minor,@shaodahong 到 antd 里升级和测试一下吧。

https://github.com/ant-design/ant-design/issues/28391#issuecomment-751545373

我这边重新安装后,打开drawer还是报错,scrolllocker="[object Object]" antd@4.10.0 rc-drawer@4.1.0 rc-dialog@8.4.6,
这个问题目前如何修复?

@yoyo837
Copy link
Member

yoyo837 commented Jan 5, 2021

rc-dialog 和 rc-drawer 都发了 minor,@shaodahong 到 antd 里升级和测试一下吧。

https://github.com/ant-design/ant-design/issues/28391#issuecomment-751545373

我这边重新安装后,打开drawer还是报错,scrolllocker="[object Object]" antd@4.10.0 rc-drawer@4.1.0 rc-dialog@8.4.6,
这个问题目前如何修复?

antd修复还没发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants