You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
I use paging to looad the data so in the form of scrolling data
�Here is the code
public async readWithPagination(t: { new(): T },lastData: any | null, orderBy: string = 'sort',directionStr: 'desc' | 'asc'='desc') {
let result: any | null = null
let startAfter = lastData
if ( startAfter == null) {
let first = this.firestoreApp.collection(this.dataPath).orderBy(orderBy,directionStr).limit(1);
let snapshot = await first.get();
startAfter = snapshot.docs[snapshot.docs.length - 1];
}
result = await this.firestoreApp.collection(this.dataPath).orderBy(orderBy,directionStr).startAfter(startAfter).limit(1).get();
return this.convertDocumentToModel(result, t);
}
The text was updated successfully, but these errors were encountered: