bugs with scroller

bugs with scroller

ivRegisivRegis Posts: 2Questions: 0Answers: 0
edited January 2012 in Bug reports
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 :)

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Can you test this with the latest version of DataTables please (1.9.0.beta.2): http://datatables.net/download/ ? 1.8.2 and 1.9 after it have fixed a few bugs in this area.

    Allan
  • ivRegisivRegis Posts: 2Questions: 0Answers: 0
    same things with 1.9.0.beta.2 in both glitch. I tested it in FF9 and chrome.

    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
This discussion has been closed.