Disable local sorting but keep styling

Tags: #<Tag:0x00007f452867fce0>

I know I can disable local sorting by returning false in beforeColumnSort hook. But the downside to it is styling (arrow for asc or desc is not shown), as we are stuck in non sort mode.

I need to disable local sorting but to allow for arrows to show up. The reason is sorting will be done by sending request to backend and user still needs to have feedback in which sort mode is he.

Any ideas for this one?

Hi @perpetualwarr

We’ll check your issue and get back to you soon.

Hi @perpetualwarr

Here you can find proposed solution for your issue. I’m using afterGetColHeader to add custom down or up arrow sign.

https://jsfiddle.net/aszymanski/65kehpL9/48/

You can change the condition from line 21 from 0 to whatever value you have on the server side.

1 Like