How to move filters from tfoot?
How to move filters from tfoot?
Pallar
Posts: 2Questions: 1Answers: 0
Hi,
I have a simple question about dataTables and "Individual column searching (select)" in particular.
Explain it to me like I am 5 - how to move filters (selects) from bottom of my filtered table from footer (<tfoot>) to somewhere else in the DOM? I am a JS beginner, so no shortcuts please, step-by-step explanation if you please.
Thanks!
This discussion has been closed.
Answers
In the example you mention - this is the key line:
Change it to append the element to wherever you want it to appear in your document.
Allan
Allan - thank you! I would buy you a decent beer for that! I looked at that code and didn't see that, and now - it's quite obvious.
Could you tell me how to pick couple of columns to create "select" filters? Don't want to generate them for all columns, just column #2 and #3 for example. Where I need to specify which columns I am interested in?
Funnily enough, an ale at 11am on a Monday morning is strangely appealing ;-)
Refering to the same example, on line 4 we have:
That is using
columns()
to select the column. By default it selects all but thecolumn-selector
option can be used to refine that.Allan