3

I’ve been searching a lot but couldn’t find an example how to jump from a position in a loaded page to another position in another page which hasn’t been loaded and how to implement placeholders.

I am aware of ‘jumpThreshold’ and ‘enablePlaceholders’ params in PagingConfig however the doc isn’t clear, all the provided examples are pretty standard and none actually covers the scenario.

I was wondering if anyone on the same boat and how did you work it out. Not sure if this is something you can help @dlam?

H.Nguyen
  • 1,621
  • 5
  • 19
  • 31
  • I am on the same boat did you find an example? for me i need to implement the placeholder with remote mediator – Renz Carlo Jun 14 '22 at 01:04

1 Answers1

0

'enablePlacedholder' should be 'true', which is there by default and then you can give 'jumpThreshold' value. for eg: I am loading 1L rows from DB with following config:

PagingConfig(
            pageSize = 400,
            prefetchDistance = 160,
            maxSize = (400 + 160) * 5,
            jumpThreshold = 4000,
            initialLoadSize = 800
        )

Take a look at this example: https://blog.ah.technology/paging-3s-placeholders-and-jumping-features-805344191df

Abhishek
  • 153
  • 1
  • 2
  • 11