Handsontable example
by aszymanski
HTML
<script src="https://cdn.jsdelivr.net/npm/handsontable@12.0/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@12.0/dist/handsontable.full.min.css" />
<div id="example1" class="hot "></div>
JavaScript
const container = document.querySelector('#example1');
const hot = new Handsontable(container, {
data: Handsontable.helper.createSpreadsheetData(1000, 1000),
width: 584,
height: 320,
colWidths: 47,
rowHeights: 23,
rowHeaders: true,
colHeaders: true,
licenseKey: 'non-commercial-and-evaluation'
});
const plugin = hot.getPlugin('AutoRowSize');
hot.updateSettings({
afterScrollVertically: function() {
console.log('First visible row index ' + plugin.getFirstVisibleRow());
}
})