enable sort removal except for one column
i'm trying to get a table ux where:
- subset of columns are sortable
- a single column is the default sort (date) (this is the shape the data is loaded in)
- all columns other than the default sort have sort removal enabled
eg. the table is default sorted descending by date. if you click the "cost" header, it sorts cost descending, then next click ascending, then next click no sort. in this event, i'd like for the table to fall back to sorting by date descending.
or in other words, sort removal should be disabled for the date column- i never want to achieve a state for which the data is not sorted by any columns. it should either be the chosen column via click, or default to date
here's the relevant code- am i doing something way wrong? this doesn't seem like an unusual ux want
table hook
0 Replies