Open macandcheese opened 7 months ago
My team would love to see this implemented. Would you have any suggestions on how to implement this with the current release of Calcite? I also see that there is an outstanding request for an advanced table (data grid) (#6646). This might be a better fit for our use case.
Check existing issues
Description
Add support for column sorting in the current Table implementation.
Acceptance Criteria
Column sorting is added to the component. An end-user should be able to sort ascending / descending / reset to default.
Relevant Info
Suggested implementation: Table Cell add an optional
value
property. Table Header add an optionalsortable
property. When Table Header is slotted in the Table Head (so, not in a row), and hassortable
enabled, Table Header will be a clickable entity with visual affordance for sort order.Of course, there can be other ways to sort a column besides ascending / descending of a single value, ideally this can be offloaded to a user as necessary and provided to an end-user through a slotted dropdown / other affordance, which will require Table Header action-end/start slot.
Which Component
Table, related components
Example Use Case
Further improvements could include multi-sort, etc., but an MVP of this would be allowing a single column to be sorted and improve from there.
Priority impact
p4 - not time sensitive
Calcite package
Esri team
Calcite (design)