Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[datatable-sort] Sort order inconsistent when comparing on equal value #1738

Open
gerardkcohen opened this issue Mar 30, 2014 · 0 comments
Open

Comments

@gerardkcohen
Copy link
Contributor

When sorting a column that has multiple instances of the same value, toggling sort will not always return the same sort order.

Ex: http://jsbin.com/zuluquba/

In the above example, toggling sort on the amount column return's inconsistent row ordering. Notice the id order of the amount column when ascending/ descending is not always the same. As far as I can tell this only happens in Chrome (Im on a Mac).

This could possibly be an accessibility issue for users with cognitive disabilities. It is also very noticeable if you have a selection column (checkbox) and the item you have selected does not always appear in the same location on every sort.

Those might be minor issues, but the major issue is with pagination.

Ex: http://jsbin.com/wogayiku

In this example, when sorting the amount column in descending order you will find the same 2 id's at the bottom of the first page, and again at the bottom of the second page. This means 2 items are not being shown, or can be perceived as data missing. Of course, showing all items will display the complete set. I am currently seeing this on my Mac with Chrome, Firefox, and Safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant