My table is not rendering (On production)

My table is not rendering (On production)

diego_Joaquimdiego_Joaquim Posts: 2Questions: 1Answers: 0


$(document).ready(async function() {

                tabela = await $('#example').DataTable( {

                            "processing": true,
                            "serverSide": true,
                            "select": true,
                            "ajax":"getUsuarios.php",
                            "columns": [
                                        { title: "Email", "data": "email" },
                                        { title: "Data de criação", "data": "created_At" },
                                        { title: "Data de alteração", "data": "modified_At" },
                                        { title: "Status", "data": "status_" },
                                        { title: "", "defaultContent": "<button id='btnEdit' class='btn btn-success btn-sm rounded-0' type='button' data-toggle='modal' data-target='#exampleModal2' data-whatever='@mdo' onclick='edititem();'><i class='fa fa-edit'></i></button>" },
                                        { title: "", "defaultContent": "<button id='btnDelete' class='btn btn-danger btn-sm rounded-0' type='button' data-toggle='tooltip' data-placement='top' title='Delete' onclick='deleteitem();'><i class='fa fa-trash'></i></button>" }

                                    ],
                            "language": {
                        "url": "//cdn.datatables.net/plug-ins/1.11.5/i18n/pt-BR.json"
                    }

                });

       } );

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,299Questions: 26Answers: 4,945
    Answer ✓

    Looks like the server script isn't returning any rows in the Ajax response. Start by looking at the XHR response in the browser's network inspector. Debug your server script to determine why its not providing any rows.

    Kevin

  • diego_Joaquimdiego_Joaquim Posts: 2Questions: 1Answers: 0

    thanks, Kevin

Sign In or Register to comment.