Skip to content

Commit 8109ca0

Browse files
authored
Merge pull request #3129 from Laravel-Backpack/fix-3117
[Bug] CRUD entity could not include search string
2 parents ac1241b + 53336e5 commit 8109ca0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ functionsToRunOnDataTablesDrawEvent: [],
7676
fn.apply(window, args);
7777
},
7878
updateUrl : function (new_url) {
79-
new_url = new_url.replace('/search', '');
79+
url_start = "{{ url($crud->route) }}";
80+
url_end = new_url.replace(url_start, '');
81+
url_end = url_end.replace('/search', '');
82+
new_url = url_start + url_end;
83+
8084
window.history.pushState({}, '', new_url);
8185
localStorage.setItem('{{ Str::slug($crud->getRoute()) }}_list_url', new_url);
8286
},

0 commit comments

Comments
 (0)