Open ShaibaazS opened 7 years ago
I have the exact same issue. Are you by any chance using the SmartAdmin template?
I've experienced the same issue here. At last, I found a way to bypass it. Simply avoid destroying the table if you can. Rather you clear the table and use the rows.add().draw() to update the content. In a word, keep the table instance unchanged but refresh its data.
Yes. This is known defect in plugin. I discovered it before the first release but used the plugin only for one table without any reinit. This should be fixed soon (I expect so)
When will futpib's commits be merged into master? His fix for this works for me.
destroy:true
option, and now it's working fine.@ashl1 Hello, I really liked the plugin, to destroy the table you can include this code, for those who work with ajax.
$(document).on( 'destroy.dt', function ( e, settings ) { var api = new $.fn.dataTable.Api( settings ); api.off('order.dt'); api.off('preDraw.dt'); api.off('column-visibility.dt'); api.off('search.dt'); api.off('page.dt'); api.off('length.dt'); api.off('xhr.dt'); });
@ashl1 Hello, I really liked the plugin, to destroy the table you can include this code, for those who work with ajax.
$(document).on( 'destroy.dt', function ( e, settings ) { var api = new $.fn.dataTable.Api( settings ); api.off('order.dt'); api.off('preDraw.dt'); api.off('column-visibility.dt'); api.off('search.dt'); api.off('page.dt'); api.off('length.dt'); api.off('xhr.dt'); });
it works
Thanks mutaqin07. On Wednesday, February 19, 2020, 01:32:30 PM GMT+5:30, mutaqin07 notifications@github.com wrote:
@ashl1 Hello, I really liked the plugin, to destroy the table you can include this code, for those who work with ajax.
$(document).on( 'destroy.dt', function ( e, settings ) { var api = new $.fn.dataTable.Api( settings ); api.off('order.dt'); api.off('preDraw.dt'); api.off('column-visibility.dt'); api.off('search.dt'); api.off('page.dt'); api.off('length.dt'); api.off('xhr.dt'); });
it works
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
futpib's fix is work, why still not merge it into master ??
First time when the data is generated with Data parameter the DataTable & rowsGroup loads perfectly. When I make a ajax call to get new Data for the DataTable, I do ".clear()" & ".destroy()" and repopulate the DataTable. But my page Hangs and I face this error "Maximum call stack size exceeded". After 5-10 secs the DataTable loads with the new data and rows group modifications. I have tried with all possbile solutions but getting the same Error. Hoping for a reply.