ui-utils icon indicating copy to clipboard operation
ui-utils copied to clipboard

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

Open RimvydasUrbonas opened this issue 11 years ago • 5 comments

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?

RimvydasUrbonas avatar May 28 '15 05:05 RimvydasUrbonas

That would probably mean throttling

ProLoser avatar May 29 '15 00:05 ProLoser

Yes, can we adjust throttling some how?

RimvydasUrbonas avatar May 29 '15 04:05 RimvydasUrbonas

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

PowerKiKi avatar Jul 01 '15 07:07 PowerKiKi

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

ProLoser avatar Jul 01 '15 07:07 ProLoser

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.

RimvydasUrbonas avatar Jul 01 '15 11:07 RimvydasUrbonas