The table has to be properly formatted with <thead>, <th> and <tbody> elements.
Add class sortable to the table.
To prevent sorting by a given column, add data-defaultsort="disabled" attribute to the <th> element.
In case of cells spanning over multiple columns, add data-mainsort="x" attribute to the <th> element, where x is the index of the column you wish to sort by, starting from 0.
Coverage remained the same at 40.803% when pulling 52a8c14e77ae6caee36447fdfece89797dac8811 on gabrielivascu:wip/issue825 into 012a809acb04b76ba50eec7db2e96c25bc64f511 on rosedu:master.
Coverage decreased (-0.002%) to 40.801% when pulling f36c34053117a1dd261ca9bd732d629151edb563 on gabrielivascu:wip/issue825 into 012a809acb04b76ba50eec7db2e96c25bc64f511 on rosedu:master.
Coverage decreased (-0.002%) to 40.801% when pulling 0d9753f9030589ae1fc2ba2000939296a10b8cdd on gabrielivascu:wip/issue825 into 012a809acb04b76ba50eec7db2e96c25bc64f511 on rosedu:master.
This also fixes #825
How this works:
<thead>
,<th>
and<tbody>
elements.sortable
to the table.data-defaultsort="disabled"
attribute to the<th>
element.data-mainsort="x"
attribute to the<th>
element, where x is the index of the column you wish to sort by, starting from 0.@iulianR Have a look.