DataTable().destroy() failed when the datatable is created with multiple buttons
DataTable().destroy() failed when the datatable is created with multiple buttons
the error is in line :dataTables.buttons.js:199.
for example if i add three buttons for the datatable, the ilen will be set to value of 3, but once this.remove( buttons[i].node ); is executed, the buttons array size decreases, when i gets to 2 the buttons array has only one element left, so undefined error is reported.
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
this.remove( buttons[i].node );
}
below is my suggstion fo fix:
while(buttons.length > 0){
this.remove(buttons[0].node);
}
Replies
add a snapshot
add a snapshot
See this thread also from today which also discussed this issue.
Allan