filamentgroup / tablesaw

A group of plugins for responsive tables.
MIT License
5.48k stars 434 forks source link

Don’t remove data-tablesaw-mode on destroy #193

Closed zachleat closed 8 years ago

zachleat commented 8 years ago

Reinitializing a swipe table should be easier than this:

var $tables = $( e.target ).find( ".tablesaw" );
$tables.data( "table" ).destroy();
$tables.attr( "data-tablesaw-mode", "swipe" ); // this step should not be needed.
$( e.target ).trigger( "enhance.tablesaw" );
Matthias-Hermsdorf commented 8 years ago

We have tables inside Accordion Panels. Wenn inizialising the tablesaw at dom ready, they are hidden. Thanks to @zachleat I could resolve this.

$( e.target ).trigger( "enhance.tablesaw.refresh" ); would be nice.

zachleat commented 8 years ago

@Matthias-Hermsdorf I added some documentation about this here: https://github.com/filamentgroup/tablesaw#manual-initialization-of-tablesaw-components

zachleat commented 8 years ago

Looks this this is fixed in the newest version.