ashl1 / datatables-rowsgroup

The Datatables feature plugin that groups rows (merge cells vertically) in according to specified columns.
Other
95 stars 94 forks source link

Maximum call stack exceeded after destroy and reinit #13

Open ShaibaazS opened 7 years ago

ShaibaazS commented 7 years ago

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.

netsudo commented 7 years ago

I have the exact same issue. Are you by any chance using the SmartAdmin template?

DreamSeason commented 7 years ago

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.

ashl1 commented 7 years ago

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)

jellylamp commented 6 years ago

When will futpib's commits be merged into master? His fix for this works for me.

https://github.com/ashl1/datatables-rowsgroup/pull/11

tianbis commented 5 years ago

11 Works for me too. In particular, I'm using the destroy:true option, and now it's working fine.

jrsaavedra1022 commented 5 years ago

@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'); });

mutaqin07 commented 4 years ago

@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

ShaibaazS commented 4 years ago

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.

zulfirman commented 4 years ago

futpib's fix is work, why still not merge it into master ??