Skip to content

Commit 56ef034

Browse files
committed
fixes #3117 - CRUD entity could not include search string
1 parent e977d53 commit 56ef034

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
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+
base_url = "{{ url($crud->route) }}";
80+
new_url = new_url.replace(base_url, '');
7981
new_url = new_url.replace('/search', '');
82+
new_url = base_url + new_url;
83+
8084
window.history.pushState({}, '', new_url);
8185
localStorage.setItem('{{ Str::slug($crud->getRoute()) }}_list_url', new_url);
8286
},

0 commit comments

Comments
 (0)