Closed JonasKellerer closed 5 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dashboards-components | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 17, 2024 3:15pm |
Cool, thanks! One small caveat: The column header currently does not indicate the order. Although the values are sorted, it just shows:
When the table is manually sorted, it shows:
it would be great if we could also have the latter display for the initial sorting.
Gridjs does not support to specify the column to sort by when rendering. I tinkered a little with plugins and the config. However, I was not able to to set the column to initially sort by. (I was able to set it initially, but only to ascending, or I was able to set it, but then the table did not change any longer when clicking on the headers. When we put the state outside of the table component, this might be a solution, but I fear that we might loose some of the other functionality).
resolves #251
Summary
It is now possible to sort the aggregate by an initial field and direction. The initial sorting direction is discarded, when users click on the header of each column.
Screenshot
IntitialSortField: count, InitialSortDirection: descending
PR Checklist