-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Conversation
cdfe06b
to
cfa8f80
Compare
ci 修下? |
circelci 不用了,删了就行 |
刚看了下,,抽屉内部不能滑动了。。好像不能禁 document touchmove。。。 |
Done. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/drawer/n73epmelv |
@@ -115,35 +111,35 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> { | |||
this.forceUpdate(() => { | |||
this.domFocus(); | |||
}); | |||
this.props.scrollLocker?.lock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strict 模式下 getDerivedStateFromProps 会调用多次,这样会不会有问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不会,lock
底层判断了,只会调一次
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修复还没发布 |
Fixes react-component/util#183
Fixes ant-design/ant-design#28391
Fixes ant-design/ant-design#28528
Fixes ant-design/ant-design#25972