[英]SpreadJS - get updated cell text on keyDown/keyUp event
I am using SpreadJS version 12我正在使用 SpreadJS 版本 12
What I want is to get cell text/value after each keyDown/keyUp event.我想要的是在每个 keyDown/keyUp 事件之后获取单元格文本/值。
when I try to run cell.text()
or cell.getValue()
I get old value(The value which was present earlier when we focused the cell)当我尝试运行
cell.text()
或cell.getValue()
时,我得到了旧值(之前我们聚焦单元格时出现的值)
for ex.例如。
If cell 0,0 has a text "Sample"如果单元格 0,0 有文本“Sample”
double click that cell to start editing双击该单元格开始编辑
we press backspace 2 times.我们按退格键 2 次。
in keyDown event we try to get cell text by cell.text()/cell.getValue()在 keyDown 事件中,我们尝试通过 cell.text()/cell.getValue() 获取单元格文本
Expected output is "Samp", but I am getting "Sample".预期 output 是“Samp”,但我得到的是“Sample”。
we can bind following event.我们可以绑定以下事件。
self.sheet.bind(GC.Spread.Sheets.Events.EditChange, function(e, args) {
console.log(args.editingText);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.