Difference between revisions of "Table sorting"

From Tech4Biowaste
Jump to navigation Jump to search
[checked revision][checked revision]
(Created page with "A table that is sortable is identified by arrows to the right of the header in a header cell. A sortable table may be sortable by one or more columns in the table. Clicking an...")
 
Line 6: Line 6:


{|class="wikitable sortable"
{|class="wikitable sortable"
!data-sort-type="date"|Header 1!!Header 2!!Header 3!!Header 4
!Header 1!!Header 2!!Header 3!!Header 4
|-
|-
|1||b||a||300
|1||b||a||300
Line 14: Line 14:
|3||c||c||100
|3||c||c||100
|-
|-
|4||a||c||100
|1||a||c||100
|-
|-
|5||b||a||200
|2||b||a||200
|-
|-
|6||c||b||300
|3||c||b||300
|}
|}


[[Category:Manual]]
[[Category:Manual]]

Revision as of 09:10, 6 January 2023

A table that is sortable is identified by arrows to the right of the header in a header cell. A sortable table may be sortable by one or more columns in the table. Clicking an arrow sorts the table rows based on the selected column. Repeated clicking of an arrow changes the sort state in this sequence: Ascending, Descending, Unsorted.

Shift-clicking the arrows of other columns will trigger a secondary sort based on the most recent column on which the shift-click occurred. NB: Shift-clicking capability extends to tertiary and beyond.

Below you find an example to test the sort-function:

Header 1 Header 2 Header 3 Header 4
1 b a 300
2 a b 200
3 c c 100
1 a c 100
2 b a 200
3 c b 300