<div class="table-responsive">
    <table id="list_data" class="table table-striped" width="100%">
        <thead>
            <tr>
                <th scope="col-" class="w50">NO</th>
                <th scope="col-" class="text-left">KODE DEPARTEMEN</th>
                <th scope="col" class="text-left">NAMA DEPARTEMEN</th>
                <th scope="col-6" class="w50">AKSI</th>
            </tr>
        </thead>
        <tbody></tbody>
    </table>
</div>
<script type="text/javascript">
    $(function() {
        // reconfigure();
        var list_data = $('#list_data').DataTable({
                    'searching'   : true,
                    'searchDelay' : 1000,
                    'paging'      : true,
                    'lengthChange': true,
                    'ordering'    : true,
                    'info'        : true,
                    'scrollX'     : true,
                    // 'scrollCollapse': true,
                    // 'fixedColumns': true,
                    'language'    :{
                                    'url'         : '<?=base_url("assets/plugins/datatables/dataTables-language-id.json")?>',
                                    'sEmptyTable' : 'Tidak ada data untuk ditampilkan',
                                    'searchPlaceholder': 'Kode/nama'
                                },
                    "processing"  : true,
                    "serverSide"  : true,
                    "order"       : [],

                    "ajax"        : {
                                        "url": "<?= route('quick-setup.departemen.list_data') ?>",
                                        "type": "POST",
                                        "complete" : function(data){
                                            reconfigure(data);
                                        }
                                    },

                    "aoColumnDefs": [
                                        { "aTargets": [0,3], "bSortable": false }
                                    ],
                    "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
                            $('td:eq(0)', nRow).css({'text-align':'center'});
                            $('td:eq(3)', nRow).css({'text-align':'center'});
                    }

        });
    });
</script>
