Custom search text not send with ServerSideAPI :(

Custom search text not send with ServerSideAPI :(

egevekeegeveke Posts: 2Questions: 1Answers: 0

I have my own search fields, i already am able to do call

datatable.search("sometext").draw();

the draw() does trigger the serverside request, but search[value] is still empty :(
What do i do wrong?

Edwin Geveke

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    I'm seeing it be sent here. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

  • egevekeegeveke Posts: 2Questions: 1Answers: 0

    Colin, thanks in my case i have my own search field, not using the default Datatable one. if you "hide" the search column.

    dt.search('ashton').draw() will not do anything.

    my work around is to post my own search field as part of the post parameters -- the serverside used that instead.

    Works great for me.

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923
    edited July 2020

    dt.search('ashton').draw() will not do anything.

    Do you get errors in your browser's console with this statement?

    in my case i have my own search field, not using the default Datatable one. if you "hide" the search column.

    That doesn't affect using the API. You can use your own input then use the API as Colin showed. But your method works two.

    Kevin

This discussion has been closed.