javascript - How to avoid multiple scroll events in virtualisation in angular grid?
问题描述
I have a grid control written in angular, it has implement Virtualization.
The Virtualization is implemented as following.
- load the first 60 records in the grid on initial load.
- every time user scrolls down load another 60 records.
- the records to be loaded are decided by the scrollTop position if the scroll.
My solution has the following issues:
- when we load the records in scroll down, as new rows are loaded in the grid, scroll events is fired for each loaded row.
- by this, it triggers 60 scroll events, on each scroll, and this causes the chaining of the scroll events.
- so in the end, the page is scrolled till the end of the screen.
How can I fix this?
解决方案
推荐阅读
- vim - 如何使 vim 设置特定于文件扩展名
- ide - 为什么 vs Code 中没有实时服务器按钮?
- ios - 如何将 Swift 静态库导入另一个 Swift 静态库
- python - 获取 PSQLException:错误:在带有 Postgres 的 spark jdbc 中使用查询而不是表名时在“SELECT”处或附近出现语法错误
- python - 你如何让kivy中的按钮接收触摸而不接收触摸它下面的按钮
- java - 如何从字符串中一次获取字符并设置一个 for 循环,运行第二个字符的编号以打印出第一个字符
- excel - IF 具有多个 Vlookup,每个 Vlookup 具有多个输出
- java - Apache poi Java。我正在尝试添加 upper_letter 编号,但结果是所有部分都编号为 A
- amazon-dynamodb - Dynamodb 如何存储主题标签
- reactjs - React Native 酶测试平面列表 onPress