buttons destroy

buttons destroy

raytorkraytork Posts: 1Questions: 1Answers: 0

I got an error calling buttons().destroy() 1.10.12
After attaching the dataTables.buttons.js instead of dataTables.buttons.min.js and getting the same error, I changed
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
to
for ( i=buttons.length - 1 ; i>=0 ; i-- ) {

to resolve the issue.
in dataTables.buttons.min.js (Buttons for DataTables 1.2.0)
the error comes in
b=0;for(c=a.length;b<c;b++)this.remove(a[b].node)
change to
b=a.length-1;for(c=0;b>=c;b--)
to resolve the issue

Answers

  • allanallan Posts: 63,818Questions: 1Answers: 10,517 Site admin

    Thanks - however, this has already been fixed. Buttons 1.2.2 is the current release which contains this fix (1.2.1 was the version with the fix in fact).

    Allan

This discussion has been closed.