mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Fix: When calculating the width for tables, need to consider TH elements as well as TD in the body. Also correctly consider complex headers
This commit is contained in:
parent
96d0b163ce
commit
4eb344cc1a
4
media/js/jquery.dataTables.js
vendored
4
media/js/jquery.dataTables.js
vendored
@ -5590,10 +5590,10 @@
|
|||||||
* first of all try to use the elements in the body, but it is possible that there are
|
* first of all try to use the elements in the body, but it is possible that there are
|
||||||
* no elements there, under which circumstances we use the header elements
|
* no elements there, under which circumstances we use the header elements
|
||||||
*/
|
*/
|
||||||
var oNodes = $("tbody tr:eq(0)>td", nCalcTmp);
|
var oNodes = $("tbody tr:eq(0)", nCalcTmp).children();
|
||||||
if ( oNodes.length === 0 )
|
if ( oNodes.length === 0 )
|
||||||
{
|
{
|
||||||
oNodes = $("thead tr:eq(0)>th", nCalcTmp);
|
oNodes = _fnGetUniqueThs( oSettings, $('thead', nCalcTmp)[0] );
|
||||||
}
|
}
|
||||||
|
|
||||||
iCorrector = 0;
|
iCorrector = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user