Skip to content

Commit

Permalink
add responsive script to draw event
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Nov 25, 2024
1 parent 13f6fc4 commit b4b7b3e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/resources/views/crud/inc/datatables_logic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,19 @@ functionsToRunOnDataTablesDrawEvent: [],
if ($('#crudTable').data('has-line-buttons-as-dropdown')) {
formatActionColumnAsDropdown();
}
if (crud.table.responsive.hasHidden()) {
$('.dtr-control').removeClass('d-none');
$('.dtr-control').addClass('d-inline');
$("#crudTable").removeClass('has-hidden-columns').addClass('has-hidden-columns');
}
}).dataTable();
// when datatables-colvis (column visibility) is toggled
// rebuild the datatable using the datatable-responsive plugin
$('#crudTable').on( 'column-visibility.dt', function (event) {
console.log('column-visibility.dt');
crud.table.responsive.rebuild();
} ).dataTable();
Expand Down

0 comments on commit b4b7b3e

Please sign in to comment.