q-table - please add "sort direction" param to column definition
See original GitHub issueHere’s a video describing the problem: https://www.screencast.com/t/GtHFyqLMA
It would be wonderful if I could add an attribute as below that would set the default sort direction at the column level, rather than just once for the initial load in the pagination object:
{
name: "globalblacklist",
align: "center",
label: "GBL",
field: "globalblacklist",
sortable: true,
**sortDir: 'desc' || descending: true //defines initial sort when column header is clicked**
},
Numeric columns are nearly always more useful sorted desc initially, whereas alpha columns are better sorted asc. This is the case whether the data comes from an array of objects or from an ajax call.
And since I’m stuck on Q1 at the moment, backporting it there would be great. Although having it in Q2 might be enough for me to make the switch…
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Qt, How can I sort QTableWidget column if the cells are widgets
I have a QTableWidget , some columns are filled with text, some with numbers, these columns are fine to sort. But I also...
Read more >Table | Quasar Framework
Dessert (100g serving) Calories Fat (g) Carbs (g) Protein (g) Sodium (mg) Ca...
Index: 4994 Cupcake 305 3.7 67 4.3 413 3%
Index: 4995 Gingerbread...
Read more >Data Table Sort Direction Param Not Firing On Certain Columns
If I comment that out then the sort direction param works fine -but the columns values are no longer correctly sorted.
Read more >Data Table - Quasar Framework
Initial sorted column, sorting direction & page is configured through the pagination prop. Check the Pagination section below.
Read more >Constructing a Table — Astropy v5.2
from astropy.table import QTable, Table, Column >>> from astropy import units as u ... of data columns with the same length defined in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will be available in Quasar v2.0.0-beta.13 & Quasar v1.15.11: new prop (column-sort-order) and new “columns” definition prop (sortOrder).
Values: “ad” (ascending-descending) and “da” (descending-ascending). Default is “ad”.
PS: thank you for being a sponsor.
Using your updated code worked. Thanks again for following up!