I needed a pull-to-refresh at the bottom of the list for pagination, so I built it in. I haven't had the need/time to add a top-of-list pull-to-refresh but it would definitely be useful. You just drop an element with the class name "pull-to-refresh" in your scroll list, and it fires events (pullingUp, pulledUp, and pullCancel) automatically.
As well, I've made scrollability emit a scroll event during scrolling. I throttled it to once per every 20ms so that it wouldn't fire too frequently, but often enough that you can do something such as "sticky headers." It doesn't bubble, so it won't interfere with the scrollToTop feature.
I'm not sure if these are "clean enough" solutions. Definitely open to suggestions on how to improve these additions.
I needed a pull-to-refresh at the bottom of the list for pagination, so I built it in. I haven't had the need/time to add a top-of-list pull-to-refresh but it would definitely be useful. You just drop an element with the class name "pull-to-refresh" in your scroll list, and it fires events (
pullingUp
,pulledUp
, andpullCancel
) automatically.As well, I've made scrollability emit a
scroll
event during scrolling. I throttled it to once per every 20ms so that it wouldn't fire too frequently, but often enough that you can do something such as "sticky headers." It doesn't bubble, so it won't interfere with the scrollToTop feature.I'm not sure if these are "clean enough" solutions. Definitely open to suggestions on how to improve these additions.