Table with flash buttons destroy bug
Table with flash buttons destroy bug

http://live.datatables.net/cuyemayu/15/edit
See test case comments.
Using an extend: 'copyFlash' button with an init function gives a JS error when destroying the table.
This discussion has been closed.
Replies
Whats with the
You can replace it with "table.destroy(true);", the issue still happens.
Thats not what im saying, im wondering why do you destroy it? is that part of hte issue?
So the issue here is that you've overridden the default
init
function. That is used to create the Flash movie etc. So even if there weren't this Javascript error, the copy button wouldn't actually do anything (or would throw some other error when activated).If you want to override the default
init
function you would need to include the logic from the original. You could for example call$.fn.dataTable.buttons.copyFlash.init( dt, button, config );
.Allan
Im guessing
init
is an alias ofinitComplete
?@allan, do you have these aliases listed anywhere? I always see diff options that seem to do the same things
No -
init
in this case isbuttons.buttons.init
. It is the Button initialisation function.The only alias are the Hungarian / camelCase aliases (there are some very minor ones in addition to them, but only in order to make that conversion work).
Allan
I see, using button init function prevents the default extended action... meh this used to work in tableTools.
Anyhow the $.fn.dataTable.buttons.copyFlash.init( dt, button, config ); line doesn't work, it's undefined.
Simple typo:
Allan
I was going to tell I found that call too. With that call it works.
Thanks.