Editor, Inline Editing, Keytable, and keys.Editor option

Editor, Inline Editing, Keytable, and keys.Editor option

msand01msand01 Posts: 54Questions: 24Answers: 1
edited July 2018 in Editor

In this example,
https://editor.datatables.net/examples/extensions/keyTable.html,
I am unable to edit in the cells using the backspace key or mouse click or insert any characters until the cell is cleared first by typing any key (but the backspace key) - which then automatically clears the entire cell. After doing this, I am then able to backspace and insert characters; but this is only enabled after the cell has been cleared. This is at times undesirable for fields which are longer and where you may want to insert or remove a character or characters without first clearing the contents of the cell.
For me, in my own development environment, this seems to have cropped up recently - since I have another app using this same scenario, but with slightly older DT js libraries, and I am able to inline edit in cells without first clearing the cell.

I am wondering if this is by design or a consequence of something else at play? Has anyone experienced anything similar?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    KeyTable 2.5 is going to resolve some of these issues. There you will be able to:

    1. Single click - it focuses and you can start typing to replace the current contents of the cell.
    2. Double click - it focuses and enters into edit mode (like editOnFocus used to do) and places the cursor at the end of the current text.

    This makes the behaviour more consistent with Excel and other spreadsheet programs.

    This commit added that and it is available in the nightly if you fancy trying it out.

    Allan

This discussion has been closed.