Problems using column filter input field with "ordering: true" and "colReorder: true"
Problems using column filter input field with "ordering: true" and "colReorder: true"
I have added several filter input fields into the thead
section of my DataTable - the users don't want the filters at the bottom of the table, they want them above the columns.
It does work, but only to an extent...
If I don't have colReorder: true
set then I am able to enter text into the filter field and the filter is applied (but obviously the cloumns are not reorderable).
There is an issue though - as I have clicked on the th
element the column is sorted before I enter any text into the filter field. Ideally I would not like this to happen, I'd like to be able to add something like this :not('input')
to the onClick
behaviour of the header
More pressingly I would like to be able to use the search functionality and colReorder: true
together. However with colReorder: true
applied I am no longer able to enter anything into the input field, it now treats the whole th
as a clickable area for sorting the data.
I've tried adding a z-index
to the input field, but that has made no difference. I've also tried moving the filters to a row inside the datatable itself. This did allow me to enter text into the filter fieds, but the filters weren't applied, plus when the columns were moved, the filter input fields did not move along with them!
Any ideas as to how I can achieve what I'm attempting to do will be gratefull received.
Thanks