Events.CellChanged,无法监听到直接选中单元格快捷键 delete删除的场景
我选中一个单元格,按delete 删除单元格内容,Events.CellChanged的监听函数没有反应,需在单元格改动才能监听到
可以用别的方式监听到吗?
- activeSheet.bind(Events.CellChanged, (e, info) => {
- const { sheet, row, col, propertyName } = info;
- if (row === undefined || col === undefined || propertyName !== 'value') {
- return;
- }
- if (sheet.hasPendingChanges(row, col)) {
- const dirtyDataArray = sheet.getDirtyCells(row, col) || [];
- setHasEdit(dirtyDataArray.length > 0);
- }
- });
复制代码
|