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

当下拉框滚动条不处于顶部时,关闭下拉框再展开,火狐在loading和loading结束后显示空白,需要滚动滚动条数据才会显示 #185

Open
Amumu-z opened this issue Aug 12, 2022 · 2 comments

Comments

@Amumu-z
Copy link

Amumu-z commented Aug 12, 2022

我在dropdownRender中添加了Spin,dropdownRender={(menu) => {menu}}
展开下拉框后将滚动条向下滚动,关闭下拉框,再展开后,火狐在loading时,以及loading结束后,下拉框内展示空白,需要再次滚动条,数据才会显示。
关闭虚拟滚动后将没有此问题。
image

@Jisl
Copy link

Jisl commented Feb 13, 2023

看着是浏览器的css bug,渲染内容的位置是通过transform平移的,同样的css,两种情况下firefox渲染却是不一致。可以手动触发scrollTo方法让组件重新渲染

@xulingling0
Copy link

看着是浏览器的css bug,渲染内容的位置是通过transform平移的,同样的css,两种情况下firefox渲染却是不一致。可以手动触发scrollTo方法让组件重新渲染

不是浏览器的css bug,问题在于元素高度变化时,onScroll 在 firefox 没有被触发,导致获取到的偏移量(Transform)是之前的, 而 此时 'rc-virtual-list-holder' 的 scrollTop 却是0 ,元素展示位置在视线外

image

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

No branches or pull requests

3 participants