Columns custom width resetted after scroll down and up (with fixedHeader plugin)
Columns custom width resetted after scroll down and up (with fixedHeader plugin)
ManuDoni
Posts: 2Questions: 1Answers: 0
Hi,
I have a problem with custom width on <th>, using fixedHeader plugin.
If I set for example a th like this:
<th style="width:400px">Large column</th>
and I scroll down (until the fixed header appears) and up again, the width of the column will fit the content instead of being 400px.
This is the config:
{
autoWidth: false,
fixedHeader: true,
responsive: true,
}
This is the fiddle:
http://live.datatables.net/dubefetu/1/edit?html,css,js,console,output
Thanks in advance
This discussion has been closed.
Answers
Thanks for that test case, that really helped demonstrate the issue. I agree something looks wobbly there. I've raised it internally (DD-1415 for my reference) and we'll report back here when there's an update.
Cheers,
Colin
Hello @colin , any news?
I Noticed that this happens because the "real" <thead> gets recreated when the fixed header disappears (scrolling to the top).
The regeneration of the thead lose the
style
attribute of the <th>.Is there a way, by api or config, to avoid the recreation of the thead?