DataTables / FixedHeader

Fix the header, footer, left or right columns of a table in place, to always show them when scrolling
http://www.datatables.net/
Other
75 stars 83 forks source link

Append filters to header columns (yadcf) #47

Closed vedmack closed 8 years ago

vedmack commented 9 years ago

I was wondering what is the best way to append my yadcf filters to the th of the columns,

Right now I'm using the oTable._fnGetUniqueThs() to get the th to which I append filters, but with FixedHeader it doesn't play well, any suggestions on how I should handle it?

Here is my test case

https://github.com/vedmack/yadcf/issues/157

DataTables commented 9 years ago

To be honest there isn't a good why of handling this at the moment. FixedHeader needs a big upgrade in this regard. There are also a number of complications when you consider that the FixedHeader can reclone the original cells under certain circumstances, destroying any inputs and user data already present.

At this time, FixedHeader just isn't suitable for this kind of thing. Sorry!

DataTables commented 8 years ago

Things have chanced this we originally discussed this. As of v3, FixedHeader doesn't display a clone but rather the original element - so this should now work without any modification.

vedmack commented 8 years ago

Great news :)

I jsut tried it on my showcase page , but it doesn't seems to work at all. You can take a look ath the dom_ajax_multiple_1.10_example.js (or even better from dev tools) , I also noticing that something does happen while scrolling (it can be noticed in the elements tab of the chrome dev tools) but in the end on the UI nothing happens.

DataTables commented 8 years ago

The page isn't including the FixedHeader CSS, which is required in v3. I think that should resolve the issue.

vedmack commented 8 years ago

Ohh, my bad. its working now :)

Say did the FixedColumn got an upgrade as the FixedHeader? If not, is it planned?

DataTables commented 8 years ago

FixedColumns unfortunately has to take a clone of the element since it needs to float on the left or right. I haven't found a way around that yet, so currently no, there is no planned change for that.