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

nz-list 通过metarial的cdk-virtual-scroll-viewport实现的demo的错误解读 #4118

Closed
yhz1992 opened this issue Sep 5, 2019 · 1 comment · Fixed by #5959
Closed

nz-list 通过metarial的cdk-virtual-scroll-viewport实现的demo的错误解读 #4118

yhz1992 opened this issue Sep 5, 2019 · 1 comment · Fixed by #5959
Assignees

Comments

@yhz1992
Copy link

yhz1992 commented Sep 5, 2019

Reproduction link

https://stackblitz.com/run

Steps to reproduce

nz-list的无限滚动demo

What is expected?

这个demo实现的是虚拟滚动,并非无限滚动,因为在组件创建前就通过数据源声明了数据的长度,无限滚动,“无限”的前提是不知道数据的总长度,只不过全量的数据不在前端内存中,每次通过请求后端来获取指定指定分页的数据数据,这个还是虚拟滚动的策略。

What is actually happening?

无限滚动的最好实现是移动端的浏览器内容页,只有当每次滚动视口底部才会去请求新的数据,更新数据的总长度,滚动条的滑块高度是随着不断下拉而减小的。

Environment Info
ng-zorro-antd 8.2.1
Browser chrome 76.0

请实现真实的无限滚动

@zorro-bot
Copy link

zorro-bot bot commented Sep 5, 2019

Translation of this issue:

Nz-list Misinterpretation of demo via metaaral's cdk-virtual-scroll-viewport

Reproduction link

https://stackblitz.com/run

Steps to reproduce

Nz-list's infinite scrolling demo

What is expected?

This demo implements virtual scrolling, not infinite scrolling, because the length of the data is declared by the data source before the component is created, and the scrolling is infinite. The premise of "infinite" is that the total length of the data is unknown, but the full amount of data is not at the front end. In memory, each time through the request backend to get the data data of the specified specified page, this is still a virtual scrolling strategy.

What is actually happening?

The best implementation of infinite scrolling is the browser's content page on the mobile side. Only when the bottom of the viewport is scrolled to request new data, the total length of the data is updated. The slider height of the scroll bar is reduced with continuous pulldown. of.

Environment Info
ng-zorro-antd 8.2.1
Browser chrome 76.0

Please achieve true infinite scrolling

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

Successfully merging a pull request may close this issue.

2 participants