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

329
Views
¿Cómo podemos combinar el método startAfter () en firebase según la condición?

Estoy escribiendo una consulta para paginar mis datos en firebase. Pero tengo una pregunta simple y rápida. ¿Es posible agregar el método startAfter() basado en condiciones como las siguientes? Si es posible, guíeme porque probé de diferentes maneras pero no funciona.

 onMounted(() => { loadPapers() }) const loadPapers = () => { const savedTopifyPapers = db.collection('savedTopifyPapers') savedTopifyPapers.orderBy('timeStamp', 'asc').limit(1) if (lastDoc.value) { savedTopifyPapers.startAfter(lastDoc.value) } savedTopifyPapers.onSnapshot((snapshot) => { lastDoc.value = snapshot.docs[snapshot.docs.length - 1] if (snapshot.empty) { loadingData.value = false } papersData.value = snapshot.docs.map((doc) => { const data = doc.data() const id = doc.id loadingData.value = false return { id, ...data } }) papersDataLength.value = papersData.value.length })

¡Cualquier solución apreciada!

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!