I’m using AUI’s sortable table and I’m removing and adding new rows to this table. After this modification, sort operations reverting older rows. Is there a way to clean this sorting cache or reintialize this sorting feature after modifiying table?
Under the hood, AUI uses a jQuery plugin called “tablesorter” to provide the sorting behaviour. Specifically, AUI uses v2.17.7 of Mottie’s fork of tablesorter.
According to the docs of the modded tablesorter plugin, you can cause the table to re-sort itself by doing the following:
You can see their docs for an example of dynamically adding data to a table and re-sorting it: https://mottie.github.io/tablesorter/docs/example-ajax.html
They also have an example of combining the two tasks of (1) adding a new row, then (2) sorting the table. See the example here: https://mottie.github.io/tablesorter/docs/example-add-rows.html