How to implement next page token in Firestore?


I am trying to paginate my user listing with next page token in firestore. The problem is that the first query does not need a page token, so I tried to make the value for next page token as a condition, but it does not work. Anyone an idea?

Hey @radykal!

Passing the empty string as a default seems to work e.g. {{ pageToken ? pageToken : "" }}. If this query is attached to a table, you can try setting up cursor-based pagination on that table (docs here). In your case, you'll likely want to set the table's next cursor as follows:

Then, you can use:

Let me know if that helps!

Awesome. That did it!

Thanks a lot.

By the way I love your tool. I was just building my own admin panel with firebase, now I can trash it and will use yours. Such a great time-saver!