Stupid-Table-Plugin icon indicating copy to clipboard operation
Stupid-Table-Plugin copied to clipboard

Ability to cleanup/dispose/remove instances of plugin

Open philfreo opened this issue 10 years ago • 5 comments

Especially important for single page (e.g. backbone.js) apps where the table itself is being destroyed

Should be able to call:

$("table").stupidtable('dispose') or similar

philfreo avatar Apr 30 '14 17:04 philfreo

Noted, I'll consider this. Thanks for the issue. I'm pretty busy right now, so it may take me a while for me to get around to this.

joequery avatar May 01 '14 18:05 joequery

Like, 2 years? :p

ghost avatar Feb 14 '17 17:02 ghost

I did this manually. This code stops the namespaced click event and removes the instance.

$table.off('click.stupidtable');
$.removeData($table.get(0));

From here: http://ub4.underblob.com/remove-jquery-plugin-instance/

dsturbid avatar Jan 28 '19 19:01 dsturbid

This feature would be a great addition. I have a table that i reconstruct several times depending on selected filters, and it seem sorting stops working after first reconstruction.

AidosMarcos avatar Dec 17 '20 14:12 AidosMarcos

This feature would be a great addition. I have a table that i reconstruct several times depending on selected filters, and it seem sorting stops working after first reconstruction.

Hey there. I was wondering if the will_manually_build_table option plus stupidtable_build works for your use case?

https://github.com/joequery/Stupid-Table-Plugin#will_manually_build_table

joequery avatar Dec 17 '20 16:12 joequery