coreui-generator icon indicating copy to clipboard operation
coreui-generator copied to clipboard

CSS of datatable not loaded

Open thewebartisan7 opened this issue 4 years ago • 3 comments

I see that CSS of datatable_css.blade.php are not loaded correctly.

In layout app.blade.php is missing the section inclusion or stack.

In datatable_body.stub:

@section('css')
    @include('layouts.datatables_css')
@endsection

{!! $dataTable->table(['width' => '100%', 'class' => 'table table-striped table-bordered']) !!}

@push('scripts')
    @include('layouts.datatables_js')
    {!! $dataTable->scripts() !!}
@endpush

I think should be:

@push('css')
    @include('layouts.datatables_css')
@endpush

...

and in app.blade.php:

...
<head>
    ...
    @stack('css')
</head>
...

However, seem still missing some CSS even if I add this fix, see screenshot below:

Screenshot 2020-06-21 at 11 21 26

thewebartisan7 avatar Jun 21 '20 09:06 thewebartisan7

Pagination has some issue too

stefanrakicfaxi avatar Jan 19 '22 23:01 stefanrakicfaxi

https://infyom.com/blog/fix-datatables-css-or-datatables-js-not-found-or-failed-to-open-stream

thanhdevapp avatar Feb 20 '22 14:02 thanhdevapp

have the same problem, any solution ??

AlaaMShaban96 avatar Apr 29 '22 13:04 AlaaMShaban96