You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I followed the solution on this post (#1202) and I achieved my two datatables working at the same time, but..
I don't want that are loaded both at the same time, when the general page is being loaded.
That consists basically to add a if statement wrapping the JS of datatable, but I want a solution through DataTable Service implementation, like the post I referenced before. Something like this:
function postsDataTables() {
if (!$.fn.dataTable.isDataTable('#postsTable')) {
{!! $secondDataTable->html()->scripts() !!}
}
}
But this can't be done because the function "scripts()" print the tags <script></script> itself.
I don't know if what I'm asking is very easy to solve, or I'll have to write manually the JavaScript of the datatable and dispense DataTable Service in the second table.
Thanks for your attention.
The text was updated successfully, but these errors were encountered:
Hi all, I followed the solution on this post (#1202) and I achieved my two datatables working at the same time, but..
I don't want that are loaded both at the same time, when the general page is being loaded.
I want that to load the 2nd datatable when I click a specific tab/button.
I saw that in the page: https://datatables.yajrabox.com/services/two-datatables
That consists basically to add a if statement wrapping the JS of datatable, but I want a solution through DataTable Service implementation, like the post I referenced before. Something like this:
But this can't be done because the function "scripts()" print the tags <script></script> itself.
I don't know if what I'm asking is very easy to solve, or I'll have to write manually the JavaScript of the datatable and dispense DataTable Service in the second table.
Thanks for your attention.
The text was updated successfully, but these errors were encountered: