Open Rastishka opened 12 years ago
Hmm, that is weird... I'll try to figure out why it's messing up. Thanks for reporting this issue!
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!
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
Hi some0ne!
Just remove the hasCheckbox
class from the table before updating (demo):
$("table").removeClass('hasCheckbox').trigger("update", [resort]);
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!!!
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 :)
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)?
Alright, I'll look into this as well.
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.
feels odd having the checkbox just be a 'button'..
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.
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..
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.
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
Hi @balamurugan32000!
I've updated that demo... someday I'll make it look for the checkbox column instead of making you set an index.
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.
The scroller widget is a big mess... I am going to rewrite it instead of fixing all the bugs that have popped up.
Thanks. Will watch for your update.
After adding "stickyHeaders" widget to your code http://jsfiddle.net/vCTHw/153/ sorting by 1st column works incorrect...