Skip to content

adapter.isLoading is not updating #122

Closed
@GrzegorzzBB

Description

@GrzegorzzBB

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 for 50 items starting from index 1
  • isLoading flag is set to true
  • success() is fulfilled with 50 items (starting from index 1)
  • get() is called for 50 items starting from index -49 for scrolling up check
  • success() is fulfilled with 0 items (starting from index -49)
  • isLoading flag is not updated to false state

image

For version 1.3.3 I got output:
image
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:
image

So, it is about invalid RID, but why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions