Bug with option scrollX
Bug with option scrollX
Hi all,
I see a bug with option scrollX. There is no different when you set "scrollX" : true or "scrollX":false.
I read https://datatables.net/reference/option/scrollX. That said the default value of "scrollX" is false. But when I debug in to lib I think there is a mistake default value is "" and it's compare "scrollX" with "".
You can see line 3840 (DataTables 1.10.5):
if ( scrollX === "" ) {
// No x scrolling
tableStyle.width = "100%";
// IE7 will make the width of the table when 100% include the scrollbar
// - which is shouldn't. When there is a scrollbar we need to take this
// into account.
if ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight ||
divBody.css('overflow-y') == "scroll")
) {
tableStyle.width = _fnStringToCss( table.outerWidth() - barWidth);
}
}
Note: that false === "" -> false.
And line 11598 (DataTables 1.10.5):
"sScrollX": "",
default for scrollX.
And I think it all so hapen with scrollY but i don't test for scrollY.I just test for scrollX.
Thanks!.