Hey Sean
I've noted that when there are checkboxes ticked, the behaviour of searching is undesirable and really a bit of a bug. There are two issues:
**Issue 1: Toolbar stays in CheckBox mode when searching**
Steps to Re-create:
1. in a dataTable list (rendered on client-side), check a couple of items
2. then add search terms in search box
Expected:
1. the checked toolbar should remain visible
Actual:
1. the checked toolbar disappears
**Issue 2: CheckBox items disappear if selected during a search**
Steps to Re-create:
1. in a dataTable list (rendered on client-side), add search terms in search box
2. check the desired items
3. delete the search terms in the search box
Expected:
1. the checked items should appear in the list (also with the toolbar remaining)
Actual:
1. The checked items and toolbar appear as though nothing is checked, however, if the search terms are added back, the initially checked items are still checked. That means the dataTables hasn't cleared the checks, even though the checked items are no longer visible and for all intents and purposes, looked reset.
Desired behaviour:
1. When items are checked, these are pinned in place, so that when search terms are added, they remain onscreen.
2. When search terms are added, the checkbox toolbar remains visible, and will continue to remain visible until all items are unchecked.
This is pretty critical because the items are still checked even when not visible, so any scripting I do to delete checked items, can occur without visibility to the user. (ie. when using a batch delete function based on the checked items).
Any advice?
Cheers
Explore our range of targeted skincare solutions, each designed to address a specific concern: – Luna MicroCare Age Defy Reduce fine lines, wrinkles, and signs of aging with powerful anti-aging peptides and nourishing ingredients that restore skin elasticity and firmness. – ice age eye patch Brightening Target pigmentation, dark spots, and dullness with brightening agents that even out skin tone and promote radiant, glowing skin.
Hi Sean, please don't worry about this one. I've figured out a workaround.
I've used the order() api to automatically re-order the table whenever a checkbox is ticked, this has the effect of pinning ticked items to the top, and changed the addClass to a toggle() that only switches when the total number of selected items is 0 or >0.
Cheers!
Glad to hear that
Thanks for sharing the solution and all the best with your project.
Regard!