Skip to content

Commit

Permalink
fix datatable initialization issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Dec 5, 2024
1 parent 9c38316 commit e2a69de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/resources/views/crud/inc/filters_navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function normalizeAmpersand(string) {
// behaviour for ajax table
var new_url = '{{ url($crud->getOperationSetting("datatablesUrl").'/search') }}';
var ajax_table = $("#crudTable").DataTable();
var ajax_table = new DataTable('#crudTable');
// replace the datatables ajax url with new_url and reload it
ajax_table.ajax.url(new_url).load();
Expand All @@ -124,6 +124,9 @@ function normalizeAmpersand(string) {
// remove filters from URL
crud.updateUrl(new_url);
// hide the Remove filters button when no filter is active
$('#remove_filters_button').addClass('invisible');
});
// hide the Remove filters button when no filter is active
Expand All @@ -132,7 +135,6 @@ function normalizeAmpersand(string) {
$(".navbar-filters li[filter-name]").each(function () {
if ($(this).hasClass('active')) {
anyActiveFilters = true;
// console.log('ACTIVE FILTER');
}
});
Expand Down

0 comments on commit e2a69de

Please sign in to comment.