Handsontable example
by handsoncode
HTML
<div id="example"></div>
<script src="https://cdn.jsdelivr.net/npm/handsontable@latest/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@latest/dist/handsontable.full.min.css">
Babel + JSX
const example = document.getElementById('example');
const hot = new Handsontable(example, {
data: Handsontable.helper.createSpreadsheetData(15, 10),
licenseKey: 'non-commercial-and-evaluation',
colWidths: 100,
rowHeaders: true,
colHeaders: true,
filters: true,
dropdownMenu: {
items: {
'filter_by_value': {
hidden() {
return this.getSelectedRangeLast().to.col < 2;
}
},
'filter_action_bar': {
hidden() {
return this.getSelectedRangeLast().to.col < 2;
}
}
}
}
});