Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
Firestore data to Datatable by Page

I try to use Datatable to show data of Firestore.

firestore.collection('users').onSnapshot(function(snapshots) {
    if (!snapshots.empty) {
        let data = [];
        snapshots.forEach(function(doc) {
            data.push([doc.id, doc.data().name, doc.data().score, moment(doc.data().createdAt.toDate()).format("YYYY-MM-DD HH:mm")])
        })
        $("#users_table").DataTable({
            data: data,
            "responsive": true, "lengthChange": false, "autoWidth": false,
            "buttons": ["copy", "csv", "excel", "pdf", "print"]
          }).buttons().container().appendTo('#users_table_wrapper .col-md-6:eq(0)');
    } else {

    }
});

However, this code is not reasonable because it imports all the data from the users collection at once.

I want to import Firestore's data by page like ajax api call.

https://datatables.net/examples/server_side/pipeline.html

Is there any good way to call and display Firestore's data by page using Datatable?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!