Looking for a plugin that I thought I had seen
Looking for a plugin that I thought I had seen
kender
Posts: 11Questions: 3Answers: 1
I thought I had seen a plugin or extension that would create a multi-select filter for columns and when an option was selected it would grey out and make not selectable options that are not a valid combination with the selected options
if not, is there a redraw function that would allow me to loop through existing options and mark invalid options as disabled?
Answers
Are one of these extensions what you are looking for?
https://datatables.net/extensions/searchbuilder
https://datatables.net/extensions/searchpanes
Kevin
neither of those are what I had seen, and don't look like what I was looking for
if you look here (not datatables example)
https://www.digikey.com/en/products/filter/crystal-oscillator-resonator-accessories/175
when you select an option in the first select box, options throughout the other filter boxes grey out and become unselectable
I'm not aware of any extension that operates that way in DataTables I'm afraid. It is very similar to our SearchPanes extension that Kevin linked so, but SearchPanes won't update to deselect options like that when an external filter is activated.
Allan
@allan
Is there a function that would do this?
onfilter redraw , collect available options per column and if not available then add class/attribute?
This example will update the select options by removing the options that have been filtered from the table.
https://live.datatables.net/gejojiqu/1557/edit
You could do something similar to highlight the not available options.
Kevin
That looks like it will be a great start.. I would need to find a way to allow multi select on the active selection and instead of remove go with adding class/attribute
Thanks @kthorngren
I will mark resolved if I can get it to work
Here is a select2 example. Doesn't have the cascading but shows how to use select2.
https://live.datatables.net/jetupuda/86/edit
Kevin