Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82461

Initially filter the API and apply over all datatables filters and searches

$
0
0

I have an API for returning request items for datatables with this response:

{
    "data": [
        {
            "id": 13,
            "request": 39,
            "item": 1,
            "quantity": 1
        },
        {
            "id": 14,
            "request": 39,
            "item": 2,
            "quantity": 1
        },
        {
            "id": 15,
            "request": 40,
            "item": 2,
            "quantity": 1
        },
        {
            "id": 16,
            "request": 40,
            "item": 1,
            "quantity": 1
        }
    ],
    "recordsFiltered": 4,
    "recordsTotal": 4,
    "draw": 1
}

I can use this API perfectly with serverside True. But I want to filter it initially with {request:40} (or some other request id) and continue to use all database search and filtering applied over it (like normally). Like this is an API that shows only request:40 records. The request-id will change page to page, so I want to show only the selected request's records in those pages.

I searched a lot but didn't find anything useful for this.


Viewing all articles
Browse latest Browse all 82461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>