Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
286 stars 76 forks source link

[Table] Add support for column sorting #8916

Open macandcheese opened 7 months ago

macandcheese commented 7 months ago

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 optional sortable property. When Table Header is slotted in the Table Head (so, not in a row), and has sortable 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)

evan-cx commented 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.

macandcheese commented 1 week ago

Blocked by https://github.com/Esri/calcite-design-system/issues/6646