# AUI Sortable Table Edit Rows

**URL:** <https://community.developer.atlassian.com/t/aui-sortable-table-edit-rows/15795>\
**Category:** Jira Server\
**Tags:** aui, jira-server\
**Created:** [March 8, 2018, 12:30pm UTC](https://community.developer.atlassian.com/t/aui-sortable-table-edit-rows/15795 "2018-03-08T12:30:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![masterkeylog](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@masterkeylog](https://community.developer.atlassian.com/u/masterkeylog)\
**Post date:** [March 8, 2018, 12:30pm UTC](https://community.developer.atlassian.com/t/aui-sortable-table-edit-rows/15795/1 "2018-03-08T12:30:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![daz](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/daz/32/35911_2.png) [@daz](https://community.developer.atlassian.com/u/daz)\
**Post date:** [March 15, 2018, 11:03am UTC](https://community.developer.atlassian.com/t/aui-sortable-table-edit-rows/15795/2 "2018-03-15T11:03:06Z")

</div>

Hi @masterkeylog!

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](https://github.com/Mottie/tablesorter/tree/v2.17.7).

According to [the docs of the modded tablesorter plugin](https://mottie.github.io/tablesorter/docs/), you can cause the table to re-sort itself by doing the following:

```
$(theTableElement).trigger("update", [true]);

```

You can see their docs for an example of dynamically adding data to a table and re-sorting it: [jQuery tablesorter 2.0 - Appending table data with ajax](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: [jQuery tablesorter 2.0 - Adding a table row](https://mottie.github.io/tablesorter/docs/example-add-rows.html)

AUI’s documentation does not make this clear, so I’ve raised [AUI-4720](https://ecosystem.atlassian.net/browse/AUI-4720) and [AUI-4721](https://ecosystem.atlassian.net/browse/AUI-4721) to improve the situation.

Cheers!  
Daz
