質問

I have recently upgraded from 0.8.23 to 0.10.3 and I am facing a strange problem - the vertical scrollbar is not showing up.

I have attached 2 screenshots from the same page (one is running 0.8.23 and the other 0.10.3)

0.8.23 0.8.23

0.10.3 0.10.3

The code is the same.

役に立ちましたか?

解決

Here is an example of that version's scrollbar working on jsfiddle. If you post your code that will also help if you can't spot the difference.

Here is the 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();

});

他のヒント

Just You have change in "jquery.handsontable.full.js " in this function WalkontableSettings(instance, settings) change "renderAllRows" porperty to true.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top