Skip to content

Commit e474918

Browse files
committed
fix: ensure DataTables initialization after the page fully loads
1 parent 4bd6b36 commit e474918

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/resources/views/script.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
window.addEventListener("load", function() {
12
$(function(){window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}=window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}||{};window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"]=$("#%1$s").DataTable(%2$s);});
3+
});
24
@foreach ($scripts as $script)
35
@include($script)
46
@endforeach

0 commit comments

Comments
 (0)