Open DBD324 opened 1 year ago
Extends functionality applied in ticket #790 . Ticket is dependent on 790.
Relates to ticket #76
Need to consider how multi-sort is applied without use of keyboard shortcut. Possible dependency on contextual menus that are accessed via right-click to add sort.
Couple of notes for a potential technical implementation of this:
sortedColumn
& sortedColumnOrder
. Could convert sortedColumn to sortedColumns
with type
{
columnKey: string;
sortOrder: IcDataTableSortOrderOptions;
}[]
which would combine both states into one object and allow us to add more when we need to.
sortedColumns.length > 1
, and if so then show the badge with the sortedColumns' index + 1 as the label.Couple of questions for some functionality:
sortOptions
prop?Back to design for how the key would work, and if we even need it as it adds complication
Summary
Multi-sort provides the user with the ability to sort by multiple columns at once. With the data sorted intially by the primary sort, then secondarily by the secondary sort.
๐ฐ User value
Provides additional ability to sort data to ease location and comparison.
๐ User Stories
If relevant, describe the high-level functionality as user stories.
As an ICDS user: I need to be able to apply multi-sort to columns in a data table So that I can better control the data within a table.
An an ICDS User I need to be able to add multiple concurrent sorts, and see which sort is ordered where, So that I have better control over my data.
๐ Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.
Multi-sort Given that one column is already sorted When clicking on another column and holding down the sort key (windows=ctrl, mac=cmd, or shift on either) Then the new sort is added and each columns sort is identified by a numbered badge.
โ Designs
If there's a Figma design file (or other mock-up), include it here.
ย ๐งพ Guidance
If there's written guidance or documentation, include it here.