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

Ajax: with empty json, "processing" remains turned on

$
0
0

Hi,
i'm using datatables with ajax and **processing **set to true to show the loading view during the download of the data but.. when i have 0 data, so this json:
[{"data":[]}]

the loading view remains active :(

This is my init:

`var table = $('#table_id').DataTable({
                        "ajax": 'myajaxpage.php',
                        "processing": true,
                        responsive: true,
                        language: {
                           ...
                        },
                        columnDefs: [ .... ],
                    "createdRow": function( row, data, dataIndex ){
                        // other operations ..
                    }
                });

                new $.fn.dataTable.FixedHeader( table );`

myajaxpage.php creates an array (with json_encode($myArr) ) returning [{"data":[]}] with no data and the correct data if something has to be returned.

What am i wrong ? Could you help me please? Thanks!


Viewing all articles
Browse latest Browse all 81965

Trending Articles



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