glide-data-grid icon indicating copy to clipboard operation
glide-data-grid copied to clipboard

Add support for multi-column sort to the `useColumnSort` hook

Open lukasmasuch opened this issue 1 year ago • 1 comments

Add support for multi-column sort to the useColumnSort hook in the source package.

Proposed API (changes to useColumnSort):


type ColumnSort = {
        column: GridColumn;
        mode?: "default" | "raw" | "smart";
        direction?: "asc" | "desc";
};

type Props = Pick<DataEditorProps, "getCellContent" | "rows" | "columns"> & {
    sort?: ColumnSort | ColumnSort[];
};

Thereby, the first column sort of the list takes priority and after that the data is sorted by the second provided ColumnSort option.

lukasmasuch avatar Dec 29 '23 14:12 lukasmasuch

Yes please

jassmith avatar Dec 29 '23 18:12 jassmith