我需要一种方法来仅允许用户使用 handsontable 选择一行或一列(或整行和整列的多项选择)。
最佳答案
经过一些研究和实验,我能够在没有单元格和行句柄的情况下实现单行突出显示。
可上手的选项:
var x = new Handsontable(element, {
...
multiSelect: false,
disableVisualSelection: ['current', 'area'],
currentRowClassName: 'currentRow'
}
CSS:
.currentRow, .highlight {
background-color: lightblue;
}
关于javascript - 将选择限制为 handsontable 中的整行/列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30857341/