简体   繁体   中英

SpreadJS - get updated cell text on keyDown/keyUp event

I am using SpreadJS version 12

What I want is to get cell text/value after each keyDown/keyUp event.

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)

for ex.

If cell 0,0 has a text "Sample"

  1. double click that cell to start editing

  2. we press backspace 2 times.

  3. in keyDown event we try to get cell text by cell.text()/cell.getValue()

  4. Expected output is "Samp", but I am getting "Sample".

we can bind following event.

  self.sheet.bind(GC.Spread.Sheets.Events.EditChange, function(e, args) {
      console.log(args.editingText);
  });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM