我想用maxRows选项创建一个表。但是当我使用此选项并且表已达到最大行计数时,上下文菜单中的选项“删除行”将被禁用。有没有人知道为什么当表达到行的最大数量时,此选项被禁用?
示例代码:
var myData = [
["", "Kia", "Nissan", "Toyota", "Honda"],
["2008", 10, 11, 12, 13],
["2009", 20, 11, 14, 13],
["2010", 30, 15, 12, 13]
],
container = document.querySelector('#exampleGrid');
var hot = new Handsontable(container, {
data: myData,
startRows: 5,
startCols: 5,
minSpareCols: 1,
//always keep at least 1 spare row at the right
minSpareRows: 1,
//always keep at least 1 spare row at the bottom,
maxRows:8,
rowHeaders: true,
colHeaders: true,
contextMenu: true
});