Table sorter only works in one direction.
See original GitHub issueEnvironment(required)
- antd version: 2.8.1
- OS and its version: na
- Browser and its version: Chrome
What did you do? Please provide steps to re-produce your problem.
Use a sorter
on a table column
What do you expected?
Clicking on one direction arrow produces the reverse sorting order of clicking the other.
What happen?
Sorting works in descending order, but not in ascending.
Re-producible online demo
Visible on https://ant.design/components/table/#components-table-demo-head: Click “Up” on Name column produces: Jim - Jim - Joe - John. Click “Down” incorrectly produces: John - Jim - Joe - Jim.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
jquery tablesorter ajax table only sorting one direction
I have a table that I load via a jQuery load command. in the callback of the load function I initiate the tablesorter...
Read more >Tablesorter Plugin: Sort Alpha is only working in one direction
Hi, I have a sort parser working on a table: Table - parser for the 'Companies' column If anyone could tell me why...
Read more >jQuery plugin: Tablesorter 2.0
Property Type Default Link
cancelSelection Boolean true
cssAsc String ""
cssChildRow String "tablesorter‑childRow" 1 2
Read more >Sort header
To add sorting behavior and styling to a set of table headers, add the <mat-sort-header> component to each header and provide an id...
Read more >jQuery tablesorter 2.0 - Sorting & Filtering with Colspans
Sort Column 0 1 (toggle sort direction) - There is no method to use the UI to sort the second column because it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue does still happen. Please see this demo: https://codepen.io/anon/pen/rdKzZr?&editors=001
I have changed the ages so they are all different. Descending works correctly and produces [41, 36, 32, 31, 22, 6], but ascending produces [32, 41, 22, 36, 6, 31]. It looks to me like the data is being sorted in pairs (32, 41) / (22, 36) / (6, 31). Each of those pairs is sorted ascending, but the list of pairs is out of order.
I found more things missing in docs. Will write PR.