Handsontable Hooks undefined or null when trying to create table IE10

231 Views Asked by At

I will start with the browser that I am using is IE 10, well that I have to support. I am walking through the start guide and when creating the grid I get a property error, specifically that Unable to get property 'hooks' of undefined or null reference. It runs fine on 11, Chrome, Firefox and Edge.

Has anyone had this issue or know what I may be doing wrong?

Tutorial: https://handsontable.com/docs/6.2.0/tutorial-quick-start.html

Compatibility: https://handsontable.com/docs/6.2.0/tutorial-compatibility.html

Snippet:

var data = [
  ["", "Ford", "Tesla", "Toyota", "Honda"],
  ["2017", 10, 11, 12, 13],
  ["2018", 20, 11, 14, 13],
  ["2019", 30, 15, 12, 13]
];

var div = document.getElementById('grid');
var hot = new Handsontable(div, {
  data: data,
  rowHeaders: true,
  colHeaders: true,
  filters: true,
  dropdownMenu: true
});

Thanks guys!

1

There are 1 best solutions below

2
Jenifer Jiang On

I've referred to the tutorial and made a sample on my side. The result works well on IE10. Here is my testing code.

<body>
<div id="grid"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.min.css" rel="stylesheet" media="screen">
<script>
    var data = [
        ["", "Ford", "Tesla", "Toyota", "Honda"],
        ["2017", 10, 11, 12, 13],
        ["2018", 20, 11, 14, 13],
        ["2019", 30, 15, 12, 13]
    ];

    var div = document.getElementById('grid');
    var hot = new Handsontable(div, {
        data: data,
        rowHeaders: true,
        colHeaders: true,
        filters: true,
        dropdownMenu: true
    });
</script>
</body>

the runing resulut

I wonder that if you've followed the tutorial step by step. Both npm install handsontable-pro and embed the reference link are necessary. Or if you have added extra codes which have affected the result.