Board Thread:Support Requests - Getting Technical/@comment-4356266-20130309054347/@comment-4674838-20130309075150

More info on sortable:
 * Help page for sortable: m:Help:Sorting
 * Source code:

The sort keys are set in stone once the MediaWiki sortable code runs on pageload (it's loaded by the Resource Loader). For your base, you can create a table with an invisible first row if you want to trick sortable into setting up the sort keys of the appropriate type before you add more rows dynamically with JavaScript:

or you could use the data-sort-type attribute as mentioned on the help page I linked above:

I created a simple test case on my test wiki. Sorting the table after adding some rows dynamically is working perfectly fine for me there.

One thing I would add when using JavaScript to dynamically add content is to be very mindful of the HTML structure of the table. Make sure you are inserting the new rows in the appropriate place (tbody), otherwise sortable will not sort them.