byashimov / django-controlcenter

Set of widgets to build dashboards for Django projects
BSD 3-Clause "New" or "Revised" License
989 stars 85 forks source link

i think that regardless sortability, the table header should be always #42

Closed minusf closed 5 years ago

minusf commented 5 years ago

shown. one can always unset list_display resulting in no header.

sorting is not on by default i imagine because of the problems with sorting arbitrary data and that is fine. but the table header should not be a dependency of sorting.

codecov-io commented 5 years ago

Codecov Report

Merging #42 into develop will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           develop    #42   +/-   ##
======================================
  Coverage      100%   100%           
======================================
  Files            9      9           
  Lines          401    401           
======================================
  Hits           401    401

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b4d0f6a...f3e7f4e. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #42 into develop will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           develop    #42   +/-   ##
======================================
  Coverage      100%   100%           
======================================
  Files            9      9           
  Lines          401    401           
======================================
  Hits           401    401

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b4d0f6a...f3e7f4e. Read the comment docs.

byashimov commented 5 years ago

You should upgrade the widget class, docs and js library then. But better leave the current behaviour: js sorter is not perfect and may act weird on mixed data. That is why that is an option.

minusf commented 5 years ago

I think you have misread this diff. I did not make sortable = True by default, and the table stays unsorted; however it will show a table header if list_display is defined -- regardless if the table is sortable or not.

The way it is now, the only way to show a table header is to set the table to sortable, but I might not want to have a sortable table (maybe i sorted all as i wanted backend side) at all.