ui-scroll: adapter.isLoading is not updating
Hello again!
I really appreciate your work. This module is very advanced and satisfies my needs!
I’m working on mobile project (using webviews on mobile devices). Im trying to upgrade ui-scroll 1.3.3 to 1.5.1, but Im still facing some issues. I feed list from remote service, which uses page size
and offset
as a params. For some reason my list implementation loads only one (first) chunk of data. If user scrolls down nothing happens. He just hit the bottom of the list and it refuses to fetch more items (rows). I put some console.logs on get(), success() and adapter.isLoading.
See the result - interesting part starts from red line to bottom:
get()
method is called for50
items starting from index1
isLoading
flag is set totrue
success()
is fulfilled with50
items (starting fromindex 1
)get()
is called for50
items starting from index-49
for scrolling up checksuccess()
is fulfilled with0
items (starting fromindex -49
)isLoading
flag is not updated tofalse
state
For version 1.3.3 I got output:
So, its identical except isLoading
is set to false after all.
Can you please guide me what should I check/debug to make it work?
Thanks in advance! Gregory
EDIT: Project runs on Angular 1.4.9, this might be relevant.
EDIT2:
I put some console.logs at line 885:
console.log('RID', rid);
if (isInvalid(rid)) {
console.log('RID invalid', rid);
return;
}
…and output looks like:
So, it is about invalid RID, but why?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (8 by maintainers)
@dhilt I must confess it is a bit ugly, but the conditional heights are just a way to make the bug appear. The rest makes perfect sense for an use case we currently have (rotating and scaling content that is fetched from the server), at least for our current implementation. I am really glad you could easily find the issue and fix it. Thanks a lot! Next time, I hope I can make a PR.