Skip to content

Commit

Permalink
optimize layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Dec 8, 2024
1 parent 10bac9d commit ef35d05
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions resources/views/partials/datatable.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@
let table = new DataTable('{{ $id }}',{
keys: true,
stateSave: true,
responsive: true,
colReorder: true,
autoWidth: true,

columnDefs: [
{
orderable: false,
render: DataTable.render.select(),
targets: 0
}
],

layout:
{
paging: true,
keys: {
columns: ':not(:first-child)',
},
order: [[1, 'asc']],
autoWidth: true,
responsive: true,
colReorder: true,
},

select: {
style: 'os',
selector: 'td:first-child',
headerCheckbox: 'select-page',
items: 'row'
},

order: [[1, 'asc']],
pageLength: 100,
"lengthMenu": [ 10, 50, 100, 500 ],
});

new DataTable.Buttons(table, {
buttons: [
{
extend: 'colvis',
Expand Down

0 comments on commit ef35d05

Please sign in to comment.