reactjs - 如何在反应虚拟化中限制 onScroll 功能?
问题描述
我有代码示例。当我用鼠标滚动窗口时,每次当 scrollTop === 0 工作时我的函数 this.handle。如何限制 this.handleScroll 上的 this.handle 函数?
解决方案
在构造函数中,我将此函数与节流阀绑定,如下所示:
this.handle = throttle(this.handle, 500);
推荐阅读
- javascript - JavaScript 使用 .map() 对数组元素进行排序时的奇怪行为
- java - 如何使用 Java 在 heroku/docker 中创建临时目录?
- php - PHP soapClient 发送 XML 数据
- c# - 错误(条件:amqp:内部错误,描述:从流中读取时出现异常)
- c++ - 链接二叉搜索树的标准差
- android - 我需要在 Android 上使用 moshi 解析完整的 json 吗?
- python - 您如何将数据从 main.qml 传递到 main.py,然后将其发送到其他 qml 文件
- conditional-statements - 使用 kiefunctions 在独占网关上检查多个条件的语法
- google-cloud-platform - 在 bigquery 中将 'dd-mmm-yy' 转换为 '%Y-%m-%d %H:%M:%S' ;
- php - 需要帮助解决未定义的数组键