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

Wierd sorting in "Dynamic checkbox sorting" + "stickyHeaders" widget #83

Open
Rastishka opened this issue Jun 1, 2012 · 18 comments
Open

Comments

@Rastishka
Copy link

After adding "stickyHeaders" widget to your code http://jsfiddle.net/vCTHw/153/ sorting by 1st column works incorrect...

@Mottie
Copy link
Owner

Mottie commented Jun 1, 2012

Hmm, that is weird... I'll try to figure out why it's messing up. Thanks for reporting this issue!

Mottie added a commit that referenced this issue Jun 3, 2012
@Mottie
Copy link
Owner

Mottie commented Jun 3, 2012

Found and fixed!

I've also created a new demo with a checkbox in the header that sets or clears all checkboxes.

Thanks for reporting this issue!

@Mottie Mottie closed this as completed Jun 3, 2012
@Rastishka
Copy link
Author

I've also created a new demo with a checkbox in the header that sets or clears all checkboxes.

yes, it works with static table, but if I update the table (by ajax or any other way) check box sorting stops working.
It looks like that checkbox filters should be reinitialized???
demo

@Mottie
Copy link
Owner

Mottie commented Jun 4, 2012

Hi some0ne!

Just remove the hasCheckbox class from the table before updating (demo):

$("table").removeClass('hasCheckbox').trigger("update", [resort]); 

@Rastishka
Copy link
Author

Wow, cool! It works!!!! Thank you very much!

It would be great if you add your example to documentation, I'm sure it will be usefull to many users!!!

@Mottie
Copy link
Owner

Mottie commented Jun 4, 2012

It's already been added to the wiki home page... there is also a link in the main documentation to more demos, including this one :)

@Rastishka
Copy link
Author

And another bug report (small)! =)))

  1. On stickyHeader clicking checkbox does not switch checkboxes inside tbody, but changes sort order. May be delegete events?

  2. Are you sure that clicking checkbox should toggle ALL checkboxes in column? May be it should affect only VISIBLE rows (if using filter widget)?

@Mottie
Copy link
Owner

Mottie commented Jun 5, 2012

Alright, I'll look into this as well.

@Mottie Mottie reopened this Jun 5, 2012
@Mottie
Copy link
Owner

Mottie commented Jun 21, 2012

Ok, I've updated the demo.

Basically, I made it so clicking in the header checkbox switches the checkbox setting in the body - I'm not sure I like this because the checkbox in the header doesn't mean anything anymore.

Clicking the header will still cause the table to sort, up or down, and there really isn't a way around this unless I completely remove the sorting from that column... maybe there is a better way, but I was too busy with other updates to really dig into the code.

@thezoggy
Copy link
Collaborator

feels odd having the checkbox just be a 'button'..

@Mottie
Copy link
Owner

Mottie commented Jun 21, 2012

I'm starting to think I should just make tablesorter automatically update any modified form elements so there won't be a need for an extra parser... but the core is getting so big now.

@thezoggy
Copy link
Collaborator

personally i would NOT want tablesorter to auto update.. it would cause performance issues.. plus ts shouldnt run a loop to check when something changes.. the user's function should initiate the update request..

@Mottie
Copy link
Owner

Mottie commented Oct 7, 2012

This is the updated dynamic checkbox demo I'm sticking with... the link on the wiki page has been updated as well.

Opps, leaving this open to add as an optional widget in version 3.

@balamurugan32000
Copy link

when sticky header is visible, clicking on the "check all" checkbox does not select all child checkbox.
ie., without scrolling, if we select the header checkbox it works, but after scrolling for say 1 or 2 time, stickly header becomes visible and clicking on it does not select/unselect all child

@Mottie
Copy link
Owner

Mottie commented May 24, 2014

Hi @balamurugan32000!

I've updated that demo... someday I'll make it look for the checkbox column instead of making you set an index.

@balamurugan32000
Copy link

Thanks for the quick response. I have the same issue with other plugins like scroller, I will try to use the same solution to fix that issue.

@Mottie
Copy link
Owner

Mottie commented May 24, 2014

The scroller widget is a big mess... I am going to rewrite it instead of fixing all the bugs that have popped up.

@balamurugan32000
Copy link

Thanks. Will watch for your update.

@Mottie Mottie modified the milestone: Abelt Jan 20, 2015
@Mottie Mottie added the Widget label Jun 14, 2015
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

4 participants