2014-02-20 29 views
3

我最近從0.8.23升級到了0.10.3,而且我遇到了一個奇怪的問題 - 垂直滾動條沒有顯示出來。滾動條不會顯示在新的HandsOnTable版本中

我已附加從相同的第2米的屏幕截圖(一個正在運行0.8.23和其他0.10.3)

0.8.23 0.8.23

0.10.3 0.10.3

的代碼是一樣。

+1

提供更多信息?顯示錶格的初始化,顯示錶格周圍的html。 – Manuel

回答

1

下面是該版本的滾動條工作on jsfiddle的一個示例。如果你發佈你的代碼,如果你不能發現其中的差異,也會有所幫助。

這裏是jQuery的:

$(document).ready(function() { 

    var data = [ 
    ["", "Maserati", "Mazda", "Mercedes", "Mini", "Mitsubishi"], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2009", 0, 2941, 4303, 354, 5814], 
    ["2010", 5, 2905, 2867, 412, 5284], 
    ["2011", 4, 2517, 4822, 552, 6127], 
    ["2012", 2, 2422, 5399, 776, 4151], 
    ["2009", 0, 2941, 4303, 354, 5814] 
    ]; 

    $('#example').handsontable({ 
    data: data, 
    minSpareRows: 1, 
     scrollV: 'auto', 
    colHeaders: true, 
    contextMenu: true 
    }); 


    function bindDumpButton() { 
     $('body').on('click', 'button[name=dump]', function() { 
     var dump = $(this).data('dump'); 
     var $container = $(dump); 
     console.log('data of ' + dump, $container.handsontable('getData')); 
     }); 
    } 
    bindDumpButton(); 

}); 
0

只有你有這個功能WalkontableSettings(例如,設置)變 「renderAllRows」 porperty到真正的 「jquery.handsontable.full.js」 轉變。