-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Affix固钉在滚动条消失时,固定状态没有改变 #6764
Comments
Translation of this issue:The Affix nail disappears when the scroll bar disappears, the fixed state has not changedreproduction link[https://codesandbox.io/S/ng-zorro-antd-ivy-forked-hmeb3](https://codesandbox.io/s/ng- zorro-antd-ivy-forked-hmeb3) steps to reproduce
What is expected?Repair, Affix should cancel fixation What is actually happens?Affix solids change in the height of the WINDOW, when the scroll bar disappears, the fixed state has not changed
|
@AdvanceOrange Hi there. I didn't see that the Affix component is used in your reproduction. Could you please check that? |
|
看了源码的实现方式,原因在于nzTarget内容的变化无法触发位置更新,是否可以考虑使用ResizeObserver(不支持IE11)监控document.body或nzTarget的高度变化,示例如下 |
是的,欢迎提交 PR |
Hello @AdvanceOrange. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please fill the Pull Request Template here, provide documentation/test cases if needed and make sure CI passed, we will review it soon. Appreciate it advance and we are looking forward to your contribution! 你好 @AdvanceOrange, 我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献! |
* fix(module:affix): fix update position when target resize - close #6764 * chore: used `throttleTime` instead of `auditTime`
Reproduction link
https://codesandbox.io/s/ng-zorro-antd-ivy-forked-hmeb3
Steps to reproduce
What is expected?
修复,affix应该取消固定
What is actually happening?
Affix固钉在window高度发生改变,滚动条消失时,固定状态没有改变
The text was updated successfully, but these errors were encountered: