Replies: 2 comments
-
Hey @onl1ner I am also perplexed on why sorting on a Sorting on DB queries is a basic core function, but in this SwiftUI extension for Firebase, something as basic as: @FirestoreQuery var items: [ToDoListItem]. // struct for todo list item Trying to sort on a simple See, for example: https://developer.apple.com/forums/thread/737760 It's odd to travel into SwiftUI and Firebase from a Ruby and Python background only to find sorting on a basic query return cannot be done easily and simply. Hours of Google'n turned up nothing workable. 😞 |
Beta Was this translation helpful? Give feedback.
-
Hi @unixneo - sorting in ascending / descending order should be possible: Using @FirebaseQuery
Using a query directly (as mentioned by @onl1ner ):
LMK if this helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am wondering why there is no way to get data sorted in descending order? For example, if there is a need to retrieve information sorted by date to show newest one at the beginning.
I thought about reversing the resulting array, but I have data paging so it is not a case for me. I stopped at the idea to make my timestamps negative and format them at the client, but this is so hacky.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions