Skip to content

Added sortable functionality to Table columns

Compare
Choose a tag to compare
@MichaelRoytman MichaelRoytman released this 01 Nov 17:49
· 2217 commits to master since this release
db72d5a
  • Added props to the Table component to handle sortable functionality:
    • tableSortable boolean, representing whether the Table will have sortable columns.
    • defaultSortedColumn string, representing the default sorted column on a sortable table.
    • defaultSortDirection string, representing the default sort direction on a sortable table.
    • sortButtonsScreenReaderText object, representing screen reader only text that will be applied to any sortable column buttons.
    • columnSortable boolean, representing whether a given column is sortable.
    • onSort function, representing the function to call when a column's sort button is clicked.
  • Added buttons for sortable columns that have dynamic sort icons, screen reader only text, and ability to call a function on button click.
  • Added unit tests for sortable Tables.