Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paginate a collection #74

Open
Naimdasb opened this issue Dec 10, 2020 · 1 comment
Open

Paginate a collection #74

Naimdasb opened this issue Dec 10, 2020 · 1 comment

Comments

@Naimdasb
Copy link
Contributor

I think I found an issue with the example about this feature.

I had to add manually this to make it work.

Paginate a collection

const moreDocs = await ref
.orderBy(orderBy)
.startAfter(startAfterDocument)
.limit(limit)
.get()
.then(d => {
const docs = []
d.docs.forEach(doc => docs.push({ ...doc.data(), id: doc.id, __snapshot: doc }))
return docs
})

Thanks for your work!!

@nandorojo
Copy link
Owner

Mind adding a PR to the readme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants