filamentgroup / tablesaw

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

Re-initialising tablesaw 3.1.2 in swipe mode #384

Closed ascripter closed 2 years ago

ascripter commented 5 years ago

I have essentially the same issue like #163 with a tabbed interface and some tables residing inside containers with display: none;

I'm using the current master branch of tablesaw (3.1.2.) Issue #163 presents the following solution for tablesaw 2.0.4: $("#myTable").data('table').refresh();

I trigger the code in an event handler when the corresponding tab is clicked that sets display: flex; on the container. However it doesn't resolve the problem. Instead I get a javascript error: jQuery(...).data(...) is undefined.

Each table's html has the following form <table id="myTable" class="tablesaw tablesaw-stack" data-tablesaw-mode="swipe" data-tablesaw-sortable>

Assizes commented 3 years ago

Worked for me: $("#myTable").tablesaw().data('tablesaw').refresh(); Though, It slows down noticeable after dozens refreshes. It might be the memory leak issue.