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

Improved sorting of datatables [Fixes #357] #358

Merged
merged 2 commits into from
Apr 12, 2020

Conversation

cjchirag7
Copy link
Contributor

@cjchirag7 cjchirag7 commented Apr 12, 2020

Fixes #357
The following changes have been made :

  • Modified the comparator function to return -1, +1 or 0, depending upon the comparison of the elements
  • If the values can be converted to number, then they would be first converted to number, and then the comparison would occur. Currently, the comparison, was done, taking them all, as strings, in lexicographical order. But there might be some cases like : '2' > '12' (lexicographically) but 2 < 12 (numerically) , which may produce undesired results to the user.
  • Made the cursor to a 👆 , when user hovers over the up/down button
  • Increased the size of up and down buttons from 10px to 15px, so that they are visible
  • Now, the sort works perfectly, in both Chrome and Firefox

@birm birm self-requested a review April 12, 2020 14:30
Copy link
Member

@birm birm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@birm birm merged commit 69ea90c into camicroscope:develop Apr 12, 2020
@cjchirag7 cjchirag7 deleted the fix_sort branch April 12, 2020 16:45
@birm birm mentioned this pull request Apr 17, 2020
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

Successfully merging this pull request may close these issues.

2 participants