Closed lawsjas closed 3 years ago
This happens because DataTables is used with Bootstrap 4.
https://datatables.net/extensions/buttons/examples/styling/bootstrap4
You also need to load some additional scripts after @include('boilerplate::load.datatables', ['buttons' => true])
to make buttons
work :
@push('plugin-js')
<script src="{!! mix('/plugins/datatables/plugins/'.$plugin.'.bootstrap4.min.js', '/assets/vendor/boilerplate') !!}"></script>
@endpush
I will add these features to the blade component <x-boilerplate::datatable>
: https://sebastienheyd.github.io/boilerplate/components/datatable
I've just added the buttons
feature to the datatable component with the release 7.10.4
I strongly encourage you to use the datatable generator : https://sebastienheyd.github.io/boilerplate/datatables/create
You can also see a real example because the generator has been used for the users list : https://github.com/sebastienheyd/boilerplate/blob/master/src/Datatables/UsersDatatable.php
I am having an issue with Datatables where I am not able to add copy, excel, pdf buttons.
I've tried changing the dom to: dom: 'Bfrtip', buttons: [ 'copy', 'excel', 'pdf' ]
The css of the datatables are messed up and no buttons are displaying.
My blade code
My preview