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

Column sorting does not sort correctly after scrolling horizontally #542

Closed
JellyRollMorton opened this issue Apr 2, 2013 · 4 comments
Closed

Comments

@JellyRollMorton
Copy link

After I scroll horizontally to the right, so that the first column is no longer visible, then columns are not sorted in the correct order. Here is an example:

http://jsfiddle.net/r2b4S/

In the example, if the left column shown is Column C, then clicking the header for Column C actually appears to sort by Column A data. Clicking the Column E header appears to sort by Column C data. It seems like the sorting is not taking into account the visible offset of the columns after scrolling.

        if ($target.is('.columnSorting')) {
          var col = $target.closest('th').index();

to:

        if ($target.is('.columnSorting')) {
          var col = $target.closest('th').index() + instance.colOffset();   

I'm not sure if this is the proper fix in this case, but it appears to be working well for me.

@psmolenski
Copy link
Contributor

Fixed in 0.9.10

@agottem
Copy link

agottem commented Sep 16, 2015

This seems to be broken again in the latest version

@krzysztofspilka
Copy link
Member

@agottem thanks for reporting, reopened just now

@krzysztofspilka krzysztofspilka removed this from the 0.21.0 milestone Jan 20, 2016
@jansiegel
Copy link
Member

Should work fine after releasing 0.21.0, with the fix from #3014

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

No branches or pull requests

5 participants