bootstrap-flask icon indicating copy to clipboard operation
bootstrap-flask copied to clipboard

Sortable table columns

Open PanderMusubi opened this issue 3 years ago • 3 comments

Provide a way to sort table columns. When used, the developer must indicate which column is sorted on and if the default sort is up or down. This is shown in the header with one of:

  • https://icons.getbootstrap.com/icons/caret-down-fill/
  • https://icons.getbootstrap.com/icons/caret-up-fill/

Unsorted columns do not have an icon. When another column header is selected, then that one will be sorted. With a second click, the sorting will be reversed.

Sorting will have to work together with pagination. Initially, no second sort will be supported.

PanderMusubi avatar Oct 15 '20 09:10 PanderMusubi

This is out of scope of bootstrap, but can be easily added with datatables

ziddey avatar Dec 29 '20 07:12 ziddey

Thanks

PanderMusubi avatar Jan 15 '21 10:01 PanderMusubi

There is more functionality in bootstrap-flask which is not specifically Bootstrap. The solution you provided works but is a heavy one. As @greyli indicated this as a feature, I still would like to see a basic sort implemented on the tables here. Hence, reopening.

PanderMusubi avatar Jan 06 '22 12:01 PanderMusubi

It will bring too much complexity, I think this should be supported with an external library.

greyli avatar Aug 20 '22 10:08 greyli