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

Need to resize non-cloned elements on redraw #29

Closed DataTables closed 8 years ago

DataTables commented 10 years ago

At the moment if there is a DataTables draw, FixedHeader isn't resizing the header elements to match the new table size. Previously it was doing a full reclone so that didn't matter, but it does now wight he default to no reclone.

The workaround is:

new $.fn.dataTable.FixedHeader( table0, {
    alwaysCloneTop: true
} );

But this does need to be fixed property and the elements have their widths and heights applied on redraw. Ideally this should be a shared function between the reclone and non-clone methods...

bolemeus commented 9 years ago

+1 for this one.

I have the issue of the header not resizing properly when the width of the table changes and I spent the last couple of hours looking for a fix or a workaround to get it working. This does work, but I'm confused why this can't be found in the fixedHeader documentation (even if it is a temporary workaround). This issue seems to have been open for quite a while now, so I think this needs to be more common knowledge. ;)

DataTables commented 8 years ago

With v3 there is no alwaysCloneTop option any more, instead the original header is used and fixed.

Going to close this one now.