This topic contains 3 replies, has 2 voices, and was last updated by Jai Jai 6 months ago.

datatable search always use server side


  • dantella
    Participant

    Posts: 1
    Member Reply #14110

    Hi, I’m using datatable loading data from json source. I’ve formatted my json as yours example.

    Now I want to perform LOCAL search on datatable, without ask for an updated filtered json.

    I’ve done many tries but it seems always to ask for a new json file. How can I perform local search after I have loaded datatable with remote json data?

    (I’ve used record-selection.html and record-selection.js as sample)

    Thanks

    Jai
    Jai
    Keymaster

    Posts: 2459
    Support Staff Reply #14123

    Hi 🙂

    There is an option at data.serverFiltering, can you try to set it to false?

    Thanks


    dantella
    Participant

    Posts: 1
    Member Reply #14141

    Hi, Thanks for you soon reply.

    Setting serverFiltering to  false was one of my first try but even with serverFiltering=false, datatable ask always for remote request of filtered json.

    I’ve tried with your record-selection.html example, setting serverFiltering: false but it always ask for updated default.php (if remote api as mine doesn’t expect filtering nothing in datatable is filtered).

    Let me know if you can reproduce my issue.

     

    Jai
    Jai
    Keymaster

    Posts: 2459
    Support Staff Reply #14158

    Hi 🙂

    Can you check this example?

    src/js/demo/default/custom/components/datatables/base/data-json.js

    Does it same with your requirements?

    Thanks

You must be logged in to reply to this topic.