Docs: Add sortStable example

This commit is contained in:
Rob Garrison 2016-08-18 14:37:43 -05:00
parent 45a2abcfd9
commit a2e1c82e2c
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1
2 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,8 @@
theme : 'blue', theme : 'blue',
// Enable use of the characterEquivalents reference // Enable use of the characterEquivalents reference
sortLocaleCompare : true, sortLocaleCompare : true,
// maintain a stable sort (First Name column)
sortStable : true,
// if false, upper case sorts BEFORE lower case // if false, upper case sorts BEFORE lower case
ignoreCase : true ignoreCase : true
}); });

View File

@ -1446,7 +1446,7 @@ From the example function above, you'll end up with something similar to this HT
This isn't exactly a <a class="external" href="http://en.wikipedia.org/wiki/Unstable_sort#Stability">stable sort</a> because the sort order maintains the original unsorted order when sorting the column in an ascending direction. When sorting the column in a descending order, the opposite of the original unsorted order is returned. If that doesn't make any sense, please refer to <a href="https://github.com/Mottie/tablesorter/issues/419">issue #419</a>. This isn't exactly a <a class="external" href="http://en.wikipedia.org/wiki/Unstable_sort#Stability">stable sort</a> because the sort order maintains the original unsorted order when sorting the column in an ascending direction. When sorting the column in a descending order, the opposite of the original unsorted order is returned. If that doesn't make any sense, please refer to <a href="https://github.com/Mottie/tablesorter/issues/419">issue #419</a>.
</div> </div>
</td> </td>
<td></td> <td><a href="example-locale-sort.html">Example</a></td>
</tr> </tr>
<tr id="sortmultisortkey"> <tr id="sortmultisortkey">