mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-17 15:54:14 +01:00
Dev fix: When x-scrolling, column widths were being overridden by the
fact that the table width attribute has been removed, but was being applied to the table anyway, as 0px - causing the table to be as narrow as possible. On the plus size, the columns kept their alignment with such a misconfiguration! However, now the `width` option for columns is correctly applied in x-scrolling tables.
This commit is contained in:
parent
fd261b1dd7
commit
095d83e8c3
@ -1 +1 @@
|
||||
316e736a56ffa6239de8ac64c2752ced55052d81
|
||||
5c8c9d9d6007da411cda657f833828ebdb9b33e2
|
||||
|
14
media/js/jquery.dataTables.js
vendored
14
media/js/jquery.dataTables.js
vendored
@ -3948,16 +3948,16 @@
|
||||
// allows the table sizing to automatically adjust when the window is
|
||||
// resized. Use the width attr rather than CSS, since we can't know if the
|
||||
// CSS is a relative value or absolute - DOM read is always px.
|
||||
if ( tableWidthAttr || scrollX ) {
|
||||
if ( tableWidthAttr ) {
|
||||
table.style.width = _fnStringToCss( tableWidthAttr );
|
||||
}
|
||||
|
||||
if ( ! oSettings._reszEvt ) {
|
||||
$(window).bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {
|
||||
_fnAdjustColumnSizing( oSettings );
|
||||
} ) );
|
||||
if ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) {
|
||||
$(window).bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {
|
||||
_fnAdjustColumnSizing( oSettings );
|
||||
} ) );
|
||||
|
||||
oSettings._reszEvt = true;
|
||||
}
|
||||
oSettings._reszEvt = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user