微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

jquery – 如何禁用在handsontable中添加新的行/列?

首先,有一个众所周知的错误信息(无论如何都是一段很棒的代码),例如,user tezhm,official github issues list for handsontable

When selecting a cell on the last row of a table and drag-selecting below the row
into an area outside of the table,the scroll viewport is triggered causing
a malfunction of the view. This can be recreated using the demo tables.

因此,我决定完全关闭滚动条或禁用添加新的行/列.

但是如何禁用在handsontable中添加新的行/列?

或者,如何禁用滚动滚动?

解决方法

要禁用添加新行/列,请设置以下选项:
minSpareRows: 0,minSpareCols: 0

如果您使用的是上下文菜单,则可以使用以下命令禁用该功能

contextMenu: ["undo","redo"]

一个选项可能是将maxRows设置为数据中的行数,将maxCols设置为数据中的列数.注意:如果使用columns选项,则将忽略maxCols.

maxRows: data.numberOfRows,maxCols: data.numberOfColumns

原文地址:https://www.jb51.cc/jquery/177873.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐