table width being set when table is re-initialised although bAutoWidth is set to false
table width being set when table is re-initialised although bAutoWidth is set to false
argonym2
Posts: 4Questions: 0Answers: 0
I initalize my dataTable with bAutoWidth: false. Everything is fine, and DataTables does not set any css widths.
But when I re-initialize the table (using bDestroy: true, and bAutoWidth still set to false), a fixed css width is added to the table style (column width are still not set).
I think in fnDestroy() there should be a check if bAutoWidth is true, before following line (roughly 2222) is executed:
[code]oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);[/code]
So something like:
[code]
/* Restore the width of the original table */
if ( oSettings.bAutoWidth === true )
{
oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);
}
[/code]
At least this works for me...
Thanks for the great work! DataTables saved me a lot of work.
But when I re-initialize the table (using bDestroy: true, and bAutoWidth still set to false), a fixed css width is added to the table style (column width are still not set).
I think in fnDestroy() there should be a check if bAutoWidth is true, before following line (roughly 2222) is executed:
[code]oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);[/code]
So something like:
[code]
/* Restore the width of the original table */
if ( oSettings.bAutoWidth === true )
{
oSettings.nTable.style.width = _fnStringToCss(oSettings.sDestroyWidth);
}
[/code]
At least this works for me...
Thanks for the great work! DataTables saved me a lot of work.
This discussion has been closed.
Replies
Regards,
Allan
Regards,
Allan