We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.38.1
Android
15
https://codesandbox.io/p/sandbox/fervent-darwin-gj2x7v
Popover 内容为异步加载,即在展开之后高度会发生变化,这时 Popover 的气泡并不会动态调整位置,导致错位
No response
The text was updated successfully, but these errors were encountered:
感觉加个 ResizeObserver 能解,不过移动端上比较关注性能,是不是应该做一个开关来支持?
Sorry, something went wrong.
@zombieJ 底层的 @floating-ui/dom 是支持 ResizeObserver 动态检测大小变化的,我测试它的例子是生效的 https://codesandbox.io/p/sandbox/elegant-goodall-m72vgy 但是不知道为什么到了 antd-mobile 里没有生效,不只是大小变化没有更新,滚动页面也没有更新。怀疑是这段代码逻辑没有生效:
ant-design-mobile/src/components/popover/popover.tsx
Lines 188 to 194 in c75f300
Update: 确实是上面这个 useEffect 有问题,如果 Popover 默认是关闭的(大多数使用场景),那么执行 useEffect 时,floatingElement 肯定是 null,autoUpdate 就必然不会生效了。而文档的实例都是 defaultVisible 的,因此没有这个问题。
Successfully merging a pull request may close this issue.
Version of antd-mobile
5.38.1
Operating system and its version
Android
Browser and its version
15
Sandbox to reproduce
https://codesandbox.io/p/sandbox/fervent-darwin-gj2x7v
What happened?
Popover 内容为异步加载,即在展开之后高度会发生变化,这时 Popover 的气泡并不会动态调整位置,导致错位
Relevant log output
No response
The text was updated successfully, but these errors were encountered: