Table with hidden columns is not correctly displayed in Firefox
Table with hidden columns is not correctly displayed in Firefox
I am not sure if this is a bug in the DataTables plugin or it has something to do with Firefox.
When using colgroup
to define the sizes of the columns and when I have a hidden column via columnDefs
then the table is not rendered correctly in Firefox. The reason for this is that the columns are not there, but the col group is not omitted from the rendered table, and for some reason Firefox treats the colgroups as they are given.
Please have a look at this jsfiddle to see what I mean. In Firefox there is space left on the left side and in Chrome and IE the tables is displayed correctly (100%). Maybe the col from the hidden columns should be removed?
Thanks,
Filip
Answers
Hi,
Massive delay before replying here - sorry. So the issue is that DataTables will actively removed the elements from the document which are set to
visible: false
. That means that thecolgroup
columns are incorrect since DataTables doesn't currently supportcolgroup
modification.I'm afraid that this is a limitation of DataTables at this time. The workaround is to assign the widths directly to the header cells.
Allan