I use the ajax sorting feature of Tabulator. This was working fine for me in version 4.9 but I'm struggling to get it to work after upgrading to v5.0.7.
In version 4.9 I just used to set ajaxSorting
to true and provide the ajaxRequestFunc
function call.
I've searched the docs and spotted that in v5 I need to set the sortMode
to remote
but there's no mention of doing anything else different.
The problem I have is that the function I've assigned to ajaxRequestFunc
does not get called. When I click the column header, the table data gets cleared.
I'm sure there's something else I need to set or change for V5 but can't see what it is at the moment. Any help would be much appreciated.
Example working in v4.9 - https://codesandbox.io/s/ajaxsortv4-8lfkf
Example not working in v5 - https://codesandbox.io/s/ajaxsortv5-tw78p
The 4.9 example fires the alert when the ajaxRequestFunc
is called. There is no alert in the v5 example.
Turns out all I needed to do was set the ajaxURL. I set it to "dummy" because it's not used in my implementation; I handle the ajax call myself within the code assigned to the ajaxRequestFunc.