Skip to content

Commit f2878a6

Browse files
authored
Merge pull request #5330 from serpentblade/patch-1
Datatables Persistent URL Tracking Fix
2 parents 63f6344 + 41da712 commit f2878a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/resources/views/crud/inc/datatables_logic.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ functionsToRunOnDataTablesDrawEvent: [],
138138
newUrl = params_arr.length ? tmpUrl + "?" + params_arr.join("&") : tmpUrl;
139139
}
140140
window.history.pushState({}, '', newUrl);
141-
localStorage.setItem('{{ Str::slug($crud->getRoute()) }}_list_url', newUrl);
141+
@if ($crud->getPersistentTable())
142+
localStorage.setItem('{{ Str::slug($crud->getRoute()) }}_list_url', newUrl);
143+
@endif
142144
},
143145
dataTableConfiguration: {
144146
bInfo: {{ var_export($crud->getOperationSetting('showEntryCount') ?? true) }},

0 commit comments

Comments
 (0)