Individual Column Searching with inputs in headers 1.10.2
Individual Column Searching with inputs in headers 1.10.2
Does anyone have a working example of individual column filters with the input fields in the headers? I tried to use the comments from the example page (https://datatables.net/examples/api/multi_filter.html) to get it working but couldn't quite get it all the way there.
Here is a jsfiddle that visibly looks correct but doesn't actually do the filtering when you type within the column search inputs. Everything else seems to be working...
http://jsfiddle.net/dmurph/80umxrxe/1/
Here is a jsfiddle of it all working, but it relies on having to add a class to one of the header rows (hoping that isn't needed)...
http://jsfiddle.net/80umxrxe/6/
Thoughts?
Answers
Your first fiddle doesn't work because you declare <thead> twice in the HTML.
@dmurph , you can take a look at my yadcf plugin for datatables http://yadcf-showcase.appspot.com/
@hhm - I don't think that is an issue. Look at the 2nd jsfiddle - it also has two heads, but one is used as the filter. My example just requires having a class on the 2nd head to designate it as the filter row. There is just too much custom javascript and HTML for my liking when compared to having the filters in the footer (which is just adding it to the dom attribute when initializing dataTables).
Does anyone have a better way of making filters in the header instead of the footer of the table? I wish this was just an option within dataTables. Here is an example of what I am talking about...
http://jsfiddle.net/dmurph/b71jtjf1/
Thanks in advance.
Dan