[Solved] [V1] Table sorting strange behaviour
-
There is something strange about the ordering in the QTable examples in the documentation (V1)
see Basic example
It seems that by pressing on a column the sorting passes cyclically
- ascending
- descending
- not ordered
It’s not what I expect.
If I always click on the Calories column I expect:
- ascending
- descending
- ascending
- descending
- ascending
- descending
…
In the declaration of a column the sort field is defined as:
function (a, b, rowA, rowB)
Why not add a descending parameter (true / false)?The only example in the QTable documentation that behaves as I expect is the Custom sorting
Did I miss something?
-
@Marco
While others like myself expect it to behave as it does : )Or
ascending
descending
not orderedFor me this is the normal. Btw how would you clear the sorting (get to a not ordered state) if it was toggling just the two state ascending/descending ?
I would say use the custom sorting as you pointed out. -
Use the
binary-state-sort
prop.https://v1.quasar-framework.org/vue-components/table#QTable-API
Scott
-
Thank you @s-molinari !