topcoat-data / topcoat-public

TopCoat components, visualizations and themes
MIT License
1 stars 3 forks source link

fix: do not sort table when sort is disabled. #259

Closed sareg0 closed 1 year ago

sareg0 commented 1 year ago

What this does

Table headers were attempting to sort the table (and failing), even when the sort option was not set. This PR fixes that by making rendering a button/attaching a click handler conditional.

Notes for the reviewer

To test this component:

modules:
    - git: https://github.com/topcoat-data/topcoat-public.git
      revision: fix/table-sort-condition

More information

Screenshots / GIFs

Before

Sortable Column (Analytics Report, Exposure Tab)
Screenshot 2023-07-26 at 14 29 52
Column without sort (Analytics Report, Manage Tab)
Screenshot 2023-07-26 at 14 30 09

After

Sortable Column (Analytics Report, Exposure Tab)

after-sort

Column without sort (Analytics Report, Manage Tab)

after