Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
denselGit opened this issue Feb 16, 2022 · 1 comment
Open

Comments

@denselGit
Copy link

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.

@dataworking
Copy link

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants