angular-ui / ui-utils

Deprecated collection of modules for angular
http://angular-ui.github.io
MIT License
1.43k stars 546 forks source link

ui-scroll: loading data only at last scroll bar position #405

Closed RimvydasUrbonas closed 9 years ago

RimvydasUrbonas commented 9 years ago

Hello, if you are at page 100 and drag scroll bar to page number 20, is it possible to load data only for that last page, skipping pages in between?

ProLoser commented 9 years ago

That would probably mean throttling

RimvydasUrbonas commented 9 years ago

Yes, can we adjust throttling some how?

PowerKiKi commented 9 years ago

Actual code base of ui-scroll is in https://github.com/Hill30/NGScroller. Please re-submit your issue over there if needed.

ProLoser commented 9 years ago

@RimvydasUrbonas I would look into _.throttle or some sort of equivalent solution. It doesn't need to be a feature of this module.

RimvydasUrbonas commented 9 years ago

No this is not a throttle issue. Because even i put .throttle on viewport.bind('scroll', .throttle(resizeAndScrollHandler, 500)) on scroll.js, it comes back step by step from end to begining. It's a problem when I am e.x. at 900 to 1000 items range and I drag scrollbar at the beggining, so I expect jump directly to 0 to 100 range, but unfortunately scroll goes to 800 - 900 then 700-800 then 600-700 and when request takes few seconds to retrieve data it takes plenty of time to return to 0 - 100.