keyTable and autoFill - a few corrections

keyTable and autoFill - a few corrections

Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0
edited July 2018 in Bug reports

We have been testing the operation of KeyTable and AutoFil. In connection to this, we have comments. We suggest to enter below corrections or give us tips, how to fix it. We have been trying various avaiable options but it does not help and work well. Below is a list of things that we have noticed. We ask that you will consider to make these corrections to KeyTable and AutoFil to work friendly.

  1. after clicking enter, the cell enters into edit mode and leaves this mode at the same time
  2. double-clicking the mouse button, should enter the cell into edit mode
  3. the cell in edit mode, should allow you to move arrows over text, not leave cell
  4. in the edit cell mode, there should not be seen a square to autofill option automatically, in view mode only
  5. if the cell (eg. Last name) is in edit mode and when leaving this cell clicks on the cell which can not be edited (eg. Position) then the changes do not save

Below we will add an example in which above things take place:
https://jsfiddle.net/whmqg5sn/18/
With the above in mind, we suggest to consider that the proposed changes could be gone toward i.e. as it is in Google Doc or MS Excel in this scope, we mean that for example, enter in to the cell editing mode by (1 x enter or double click of the mouse), leaving edit mode by 1 x enter or click outside etc. It would be clear and known for user.

Let us know what and how to do or whether you will consider to repair it yourself. Thank you.

Answers

  • allanallan Posts: 63,577Questions: 1Answers: 10,483 Site admin

    Hi,

    Thanks for the feedback!

    1 & 2: I don't fully understand this point, but if you have a look at this example a single click enters edit mode while still allowing KeyTable and AutoFill to operate.

    3: KeyTable follows Excel's default behaviour here and the arrow keys will move the cell focus. This is something something we are considering for future enhancement though.

    4: Why not? It is valid to AutoFill with the entered data and the latest updates allow for that.

    5: Use the onBlur option of formOptions.inline for this. Set it to be submit.

    I take the point that KeyTable could operate a bit more like Excel, particularly with a double click to enable a "full" editing mode. It isn't something that is currently on our roadmap, but I've added it to the feature list.

    Regards,
    Allan

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

    Ad.1, 2, 3, 4

    In your example(https://editor.datatables.net/examples/extensions/excel.html), it works like this:

    A. pls select the first cell (A1), you got already edit mode, pls try to change the text, but do not use the mouse, just arrows but they do not work over text, when you use the arrows you leave the cell. Is this edition friendly? When you got edit mode, arrows should work inside cell, shouldn't it?

    B. now pls select the second cell (A2), you got already edit mode, pls try to change the text, this time, pls use mouse to enter cursor, after that, pls use AutoFill (small square) option and pull down, what result you got? I think, nothing happened
    because you have to save it before you use AutoFill option, if not, it does not work. Thats why, when you use edit mode, AutoFill square should not be seen. Should be active or shown after saving. You have to save by click on Enter.
    Then it would work clear.

    C. pls select third cell (A3), press Enter key two times, you got selected text, pls try to change some part of text without using mouse, only arrows, you could not do that, you leave the cell.

    pls, in this case, look on Google Doc or Excel how it works to make correction. Just quick example. When you click Enter x1 on selected cell you got edit mode with cursor, and then you could write, the second click on Enter save the changes and a selected cell is in a view mode, not edit.

    In short:
    1 x enter - edit mode and arrows work inside a cell -> next 1 x enter - save mode
    the arrows works for selecting cells only

    1 x mouse click -> seclect a cell, like arrows
    2 x double mouse click -> edit mode for a cell -> leave a cell save the changes

    AutoFill should not be seen in edit mode, only in view mode, otherwise it works bad.

    These changes will make it possible to use it in practice, otherwise it is a little mess because there are no clear rules when and how it works.
    Pls try to use KeyTable on a laptop without a mouse, the enter and arrows only. Is it friendly? Regards

  • allanallan Posts: 63,577Questions: 1Answers: 10,483 Site admin

    Is this edition friendly? When you got edit mode, arrows should work inside cell, shouldn't it?

    I don't disagree here. As I say, I was going for the same default behaviour as Excel, but I think you are right - this should change.

    option and pull down, what result you got? I think, nothing happened

    That appears to be a bug, thanks for letting me know about that. The AutoFill should be waiting for Editor to complete and then use the updated data.

    I agree - there needs to be some changes here. I'll post back when I've had a chance to make them.

    Thanks for the feedback.

    Allan

  • allanallan Posts: 63,577Questions: 1Answers: 10,483 Site admin

    Hi,

    Following up on this, I've modified KeyTable to now behave a lot more like Excel, particualrly for the double click action, and also resolved the AutoFill bug. Both will be in the nightly versions shortly.

    In KeyTable if you:

    • Single click:
      • It will focus on the cell
      • Allow you to type into the cell, replacing the existing text with what you type and allow arrow key navigation away from the cell
    • Double click:
      • It will activate inline editing on the cell immediately, placing the cursor at the end of the text string that already exists
      • Disable keyboard navigation of the table, allowing you to use the arrow keys to navigate the text.
      • Colour the focus ring differerntly to indicate you are in a slightly different editing mode

    How does that work for you?

    Thanks,
    Allan

  • VascoSaavedraVascoSaavedra Posts: 42Questions: 8Answers: 1

    If i'm interpreting it correctly, will the Edition only be possible by clicking?

    I'm asking because in our use case, the behavior provided by editOnFocus is very important.

    If this is the case, would be possible to maintain this functionality?

  • allanallan Posts: 63,577Questions: 1Answers: 10,483 Site admin

    With the new behaviour you can do:

    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.

    Allan

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

    Hi, it looks like it's much better than last time. We want to test it now to give you the final answer. Soon we'll let you know about the result. Nevertheless, thank you for implementing this. Regards.

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

    After updating and testing, everything works fine. Thank you for improvement. Best Regards.

  • allanallan Posts: 63,577Questions: 1Answers: 10,483 Site admin

    Thanks for the feedback - good to hear that is working better for you.

    Allan

This discussion has been closed.