Can't load table with custom button ajax reload using deferLoading

Can't load table with custom button ajax reload using deferLoading

tapabletapable Posts: 4Questions: 3Answers: 0

I did not want my datatable to load initially so I read that you can use deferLoading with a value of 0, and then creating a custom button as shown below to have it load when you press the button or use a native Datatable component that makes a new ajax call.

function buttonClickHandler(event){
  $('#testTable').DataTable().draw();
}

deferLoading works fine and prevents the table from being loaded initially. Also when I press something like sort/ordering or change the page size the server returns values and results are displayed.

However even though my custom button does make an ajax call (I checked via debugging/developer tools in chrome) it quits and no results are shown, it seems as though it has the same behaviour as deferLoading. Can someone help me?

This discussion has been closed.