datatables-rowsgroup icon indicating copy to clipboard operation
datatables-rowsgroup copied to clipboard

Plugin forces the column order to ASC in order to build the groups?

Open denselGit opened this issue 3 years ago • 1 comments

Hi, I am using Datatables 1.10.21 and Datatables RowsGroup v1.0.0 with Server-side rendering.

Columns 0 and 1 are set for rows grouping option inside table object as:

"rowsGroup": [ 0, 1 ],

If I select Column 0 order I get the correct values for 'order' and 'orderDir' on the server-side. When I Select the Column 1 sort option, the server-side code collects the correct 'order' value (i.e. "1"), but 'order' is always equal to "ASC".

However, I realized that double-click on the column sort option (when "ASC" is active) send order="DESC" on the server-side.

Is there any posibility to make column sorting work as in original datatables without RowsGroup plugin? Thank's in advanced.

denselGit avatar Feb 16 '22 17:02 denselGit

If you comment out this line from the source .js the sorting problem will go away (maybe I will find time to see what this ordering code is trying to do...):

i.e.,

this.table.order($.extend(true, [], this.order));

to

//this.table.order($.extend(true, [], this.order));

dataworking avatar Apr 05 '23 11:04 dataworking