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

[Select]页面缩放下虚拟滚动加载失效 #4978

Open
xmsz-stu opened this issue Nov 20, 2024 · 2 comments
Open

[Select]页面缩放下虚拟滚动加载失效 #4978

xmsz-stu opened this issue Nov 20, 2024 · 2 comments
Labels
improvement improve some features

Comments

@xmsz-stu
Copy link

Component

Select

Reproduction link

https://fusion.design/pc/component/select?themeid=2#virtualSelect-container

Steps to reproduce

CleanShot.2024-11-20.at.14.49.27.mp4
  1. 缩放页面
  2. 滚动加载就失效了
@zyliang96 zyliang96 added the improvement improve some features label Dec 6, 2024
@zyliang96
Copy link
Contributor

这个问题应该是因为Demo里自定义的onScroll方法导致的,用了恒等判断,改成大于等于即可

@xmsz-stu
Copy link
Author

xmsz-stu commented Dec 6, 2024

这个问题应该是因为Demo里自定义的onScroll方法导致的,用了恒等判断,改成大于等于即可

不行,它的值会小于scrollHeight

   if (scrollTop + clientHeight >= scrollHeight) {
      const otherData = generateAppendItems(length, length + 10);
      setDataSource(currentDataSource.concat(otherData));
    }

image

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

No branches or pull requests

2 participants