Move the filter from the table footer to the top of the table?
Move the filter from the table footer to the top of the table?
Is it possible to move the column filters to the top the the table rather than it sitting at the bottom?
https://datatables.net/examples/api/multi_filter.html
Answers
Technically you can place the search inputs anywhere you like on the page. They don't need to be in the footer or header. Here is an example which places the search inputs in the second header row. The reason for two headers is to keep the table from sorting when clicking inside the search input. Setting
orderCellsToptotrueplaces the sort click events in just the top header row.This example also uses
table().header()andcolumn().search().The forum has other examples/solutions of placing search inputs in the header.
Kevin
Also worth having a look at ColumnControl which makes working with per-column search inputs much easier.
Allan
Thank you both for your replies. Both these solutions have helped me achieve what I need to.