yajra / laravel-datatables

jQuery DataTables API for Laravel
https://yajrabox.com/docs/laravel-datatables
MIT License
4.74k stars 862 forks source link

sProcessing not showing wait datas (loading animation) #3168

Open gokhankapucuoglu opened 3 weeks ago

gokhankapucuoglu commented 3 weeks ago

datatables doesnt show loading effect. i created datatable "php artisan datatables:make XXXX". all js files search and change sProcessing but still no show.

public function html(): HtmlBuilder
{
    return $this->builder()
    ->setTableId('datatable_sms')
    ->setTableAttribute('class', 'table dt-responsive w-100 align-middle datatable')
    ->columns($this->getColumns())
    ->serverSide(true)
    ->processing(true)
    ->minifiedAjax()
    ->selectStyleSingle()
    ->responsive(true)
    ->autoWidth(true)
    ->language(asset('assets/admin/js/datatables/lang/tr/datatables.json'))
    ->pageLength(5)
    ->lengthMenu([
        [5, 25, 50, 100, -1],
        [5, 25, 50, 100, 'Hepsi'],
    ])
    ->drawCallback('function() {
        $(".pagination").addClass("pagination-rounded");
        $("#datatable_sms thead").addClass("table-light");
    }')
    ->parameters([
        'dom' => '
            <"row mt-3 mb-2 align-items-center"
                <"col-md-6 d-flex justify-content-start"l>
                <"col-md-6 d-flex justify-content-end"f>
            >
            <"row"
                <"col-md-12"t>
            >
            <"row align-items-top"
                <"col-md-6"i>
                <"col-md-6 d-flex justify-content-end"p>
            >
        ',
        'columnDefs' => [
            [
                'targets' => [0, -1],
                'className' => 'no-export',
            ]
        ],
    ]);
}
yajra commented 3 weeks ago

Do you have all the required css loaded too?

gokhankapucuoglu commented 3 weeks ago

yeap. lang file working good. I was wondering if anyone else encountered this problem? i think that problem because of dash theme

gokhankapucuoglu commented 3 weeks ago

serverSide apply false then message show. but apply true then now showing