react-ui
react-ui copied to clipboard
improve Table API with regards to Sorting
Presently it is possible to express in Table component API invalid configuration.
It is valid to set columns.isSortable = true and not provide the sort object. We could validate this via a custom Prop validation function, but I think it more elegant to:
- remove the
columns.isSortableparam - add new
sort.sortableColumnsparam holding an array of column names
With this change the user only has to ensure that the column names within params columns, rows, and sort match.