Empty searchpanes when using server side processing

Empty searchpanes when using server side processing

jrbeilkejrbeilke Posts: 3Questions: 1Answers: 0

Have searchpanes working with client side processing, but when I enable server side processing then I get empty panes with No data available in table returned.

Here's a test case using the live server side processing example:
http://live.datatables.net/wasagami/2/edit?html,js,output

If I flip to "serverSide": false then the searchpanes load properly.

P.S. May or may not be related, but in watching the network requests I'm not seeing the searchPanes parameters in the AJAX request per https://datatables.net/extensions/searchpanes/serverside

Answers

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    but in watching the network requests I'm not seeing the searchPanes parameters in the AJAX request per

    What version of SearchPanes are you using?

    According to the link you posted this is the requirement:

    Support for this has been available since SearchPanes 1.1

    Kevin

  • jrbeilkejrbeilke Posts: 3Questions: 1Answers: 0

    Tried 1.1.1 and 1.2.1 so far.

    With 1.1.1 the panes don't display at all and I just get No SearchPanes returned.

    With 1.2.1 the panes are displayed but they're empty and show No data available in table.

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @jrbeilke ,

    You also need to make some changes to the server-side so that you are actually returning some SearchPanes options, changing the serverSide option is not enough by itself.

    Take a look at this manual page and this example. They should give you a good starting point.

    Thanks,
    Sandy

  • kthorngrenkthorngren Posts: 20,142Questions: 26Answers: 4,736

    Looks like the searchpanes parameters you mentioned aren't sent until there is a search performed with searchpanes. Take a look at the example at the end of this blog about using serverside search panes with the Editor library. You will see the initial load doesn't send searchpanes parameters but when searching the searchpanes parameters are there.

    Are you using a server side script that supports server side searchpanes?

    Kevin

  • jrbeilkejrbeilke Posts: 3Questions: 1Answers: 0

    Using Django with the rest framework and a fork of https://github.com/izimobil/django-rest-framework-datatables where I'm attempting to add support for searchPanes.

    Thanks for the note about the parameters and the editor/serverside example. I was expecting the parameters to be included in the request as soon as searchPanes was enabled.

  • pettedemonpettedemon Posts: 38Questions: 6Answers: 0
    edited March 2021

    I'm too if I set serverSide: false the SearchPanes is working and I usessp.class.php with SearchPanes 1.2.1

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    It serverSide is set to false, then all searching is done on the client-side, so the ssp.class.php wouldn't have an impact.

    Colin

This discussion has been closed.