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

250
Views
Firestore V9 Sorting Field by array of objects. Being shuffled on update

In my app, I have lists. these lists are categorized. Each category is stored into Firestore as a doc, along with an array of objects under that doc. The item Object contains {Name:'', Completed: ''}

When I update the "Completed" value (bool), my "onSnapshot" is triggered, but the Categories / lists are retrieved in a different order... How would I go about being able to order them? In time, the user will be able to sort, move the categories up/down themselves. So therefore I cannot hard-code a particular order that prevents the user from being able to sort those categories / lists themselves...

Here is the Firestore...

Firestore

onSnapshot...

enter image description here

the list View

enter image description here

And the function that deals with the Checkbox Click

enter image description here

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!