I feel like I’m missing something obvious here. I’m trying to bind the sort formula to be ascending and descending based on the selected value. When it’s not binded, the descending works fine. When binded, I can’t find the string that makes the descending sort work. It ALWAYS sorts in ascending order despite the value it is binded to. I can’t find any documentation on it or any syntax in the mozilla js docs, because they use sort() and reverse(), not a string value of ‘asc’ or desc’. I’ve tried all of the following values with no luck.
I’m embarrassed it took me this long to turn to the community for this. For the longest time I was using formula-based sorting, eg sort(collection, key, order) because I had just assumed that the UI-based sorting was for some other usecase since it wasn’t working as expected. Well, after running into problems with the table loading more than 200 rows, I had to figure something out and revisited the UI-based sorting.
Only then did I discover this thread which immediately solved things. It’s interesting that to sort ascending, “asc” works just fine, but to sort descending one has to enter “DESC” in all caps, especially when the UI suggests “Asc” and “Desc.” This really feels like it should be resolved once and for all.