Does DataTables Support Multi-Select Checkbox Filtering in SearchPanes?
Does DataTables Support Multi-Select Checkbox Filtering in SearchPanes?
Hey there,
Just diving into DataTables for a project and it's got to work well for both desktop and mobile users. Right now, I'm using SearchPanes to let users filter table data.
For desktop, it's pretty sweet that you can "ctrl+click" to select multiple filters in the same SearchPane. But that's not really a thing on mobile, right?
So, I got to thinking, what about using checkboxes in the SearchPanes? That way, anyone could tick off multiple filters in the same pane, making it way easier for mobile users (and honestly, probably more intuitive for everyone).
But before I get in over my head trying to code this myself, I just wanted to check in: Does DataTables already have a built-in feature or setting that lets you use checkboxes to multi-select within a single SearchPane?
Really appreciate any info you can share!
Cheers.
This question has an accepted answers - jump to answer
Answers
Right. Its a good point that you make and to be honest, not one I'd thought of before. Checkboxes sound like a good option. SearchPanes is overdue for a major overhaul and I'll include this as part of it (I should note that although it is overdue, so is a ton of other stuff that I'm working on, so I can't say when exactly it will be done!).
A workaround for the moment might be to activate the
multi
select option on the SearchPane tables.Allan
Hey Allan,
Thanks a bunch for getting back to me. Iād be really chuffed if you included the checkbox thing in the future. No stress on the timeline.
I'll give the multi select option a whirl tomorrow. Should be a neat band-aid solution for the mobile guys. Your work on DataTables has been a total game-changer for my little project. So, keep on keeping on!
Cheers.
This is independent of SearchPanes but you can create your own checkbox search, for example:
https://live.datatables.net/vipifute/1/edit
Kevin
I just tweaked the example in this thread, see here, and this does what you're after and provides touchscreen multi-option selection. I tried it on mobile and it works a treat, so it should give you a workaround until the integrated solution is available!
Colin
Hey Kevin and Colin,
Thanks a ton for jumping in with your suggestions! Both of you have given me some fantastic food for thought.
Kevin, I really appreciate the custom checkbox search example you provided. It's a great approach and I can see how it would work nicely by integrating checkboxes into a dropdown above each column. A solid idea for sure.
Colin, your tweak is awesome! I really like how you've integrated the checkboxes directly into the SearchPanes. It's a smooth, professional look and exactly the kind of user experience I was hoping to provide. Tried it on my end and it works like a charm!
I think for now, I'm leaning towards Colin's approach. It really hits the mark in terms of what I'm aiming for, but Kevin, your suggestion was very valuable too. I'll definitely keep it in my back pocket for future projects.
Again, thanks for your quick responses and insightful advice. Really appreciate it!