简体   繁体   English

如何使用cdk-virtual-scroll-viewport检测开始滚动?

[英]How to detect start scrolling with cdk-virtual-scroll-viewport?

I'm looking for an event or any method to detect when the user starts scrolling through the list. 我正在寻找一个事件或任何方法来检测用户何时开始滚动列表。

I know the elementScrolled Method, but the Observable emits way too often. 我知道elementScrolled方法,但是Observable发出的频率太高。

Do you maybe have any workaround for this issue? 您可能对此问题有任何解决方法吗?

I would be very happy about any suggestions :) 我会很高兴任何建议:)

Have you tried to use 'auditTimeInMs' 你试过使用'auditTimeInMs'吗?

https://material.angular.io/cdk/scrolling/api#ScrollDispatcher https://material.angular.io/cdk/scrolling/api#ScrollDispatcher

auditTimeInMs? auditTimeInMs? number
Time to throttle the scroll events. 是时候限制滚动事件了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM