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

Add appendTo option for FixedHeader. #46

Closed stephencattaneo closed 5 years ago

stephencattaneo commented 9 years ago

This option takes a selector that if matching an element, will appendChild of that element instead of document body.

For our use of this DataTables extension, being able to specify where the created element lives is extremely helpful for styling the element.

DataTables commented 9 years ago

Most of the positional logic assumes that it will be appended to the body. Does this not cause problems for that?

stephencattaneo commented 9 years ago

For my 4 uses of this extension, I haven't run into positioning issues.

stephencattaneo commented 9 years ago

I suppose if the appendTo element was positioned absolutely the fixed header's position would be off.

DataTables commented 9 years ago

Interesting! FixedHeader does use absolute positioning when being the extremities of the table (code), while fixed positioning is used "inside" the table's scrolling zone.

I'll look into the impact of this when I get a chance (moving office atm, so a little displaced and out of sorted with everything! :-) ).

stephencattaneo commented 5 years ago

this change probably doesn't work anymore. closing.