bugs with scroller
bugs with scroller
ivRegis
Posts: 2Questions: 0Answers: 0
Hey Allan,
I use datatable 1.8.1 + scroller 1.0.1
I face the width resizing bug. So I opened the code and quickly fix it for my unique case. I did not look into all other report, sry if I duplicated one. That what I changed in the "_fnScrollDraw" function, I added those line of code in the "o.oScroll.sX === """ condition.
(~line 3696)
[code]
nScrollHeadInner.style.width = '100%';
nScrollHeadInner.children[0].style.width = '100%';
[/code]
Also in this function, ~6 line below, I had a bug with hidden columns initialization. In my "aoColumns" property I have bVisible to false and _fnVisibleToColumnIndex() return null, so it crash on the next line...
I added "if(iVis)"... to avoid the error... and it looks to work until now... hehe
[code]
iVis = _fnVisibleToColumnIndex( o, i );
nThs[i].style.width = o.aoColumns[iVis].sWidth; // iVis is null
[/code]
Hope it helps, thx for your great job!
Let me know when you'll fix it properly :)
I use datatable 1.8.1 + scroller 1.0.1
I face the width resizing bug. So I opened the code and quickly fix it for my unique case. I did not look into all other report, sry if I duplicated one. That what I changed in the "_fnScrollDraw" function, I added those line of code in the "o.oScroll.sX === """ condition.
(~line 3696)
[code]
nScrollHeadInner.style.width = '100%';
nScrollHeadInner.children[0].style.width = '100%';
[/code]
Also in this function, ~6 line below, I had a bug with hidden columns initialization. In my "aoColumns" property I have bVisible to false and _fnVisibleToColumnIndex() return null, so it crash on the next line...
I added "if(iVis)"... to avoid the error... and it looks to work until now... hehe
[code]
iVis = _fnVisibleToColumnIndex( o, i );
nThs[i].style.width = o.aoColumns[iVis].sWidth; // iVis is null
[/code]
Hope it helps, thx for your great job!
Let me know when you'll fix it properly :)
This discussion has been closed.
Replies
Allan
In my case I hide/show some columns through [code]oTable.fnSetColumnVis(...)[/code] and call [code]oTable.fnSettings().oScroller.fnMeasure(true);[/code]
actualy the table resize but only if it get larger, if I hide some, so I expect the table to shrink, but it doesn't, because the [code]nScrollHeadInner[/code] and its child table keep the fixed width (5000px). that why I need to put them a width "100%".
for the null error, I still fix it with the "if" but I dont know if it broke some other things... As I said in my case it works until now :)
iv