react-ui icon indicating copy to clipboard operation
react-ui copied to clipboard

improve Table API with regards to Sorting

Open mbohal opened this issue 4 years ago • 0 comments

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.isSortable param
  • add new sort.sortableColumns param 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.

mbohal avatar Sep 02 '21 07:09 mbohal