AutoFill and KeyTable together with option: editOnFocus

AutoFill and KeyTable together with option: editOnFocus

Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

I would like to draw your attantion that there is a problem with the autoFill extension, that does not work properly if the EditOnFocus: true option is used in the KeyTable extension. Due to use multi-item editing, any editing completely stops working.

Example:
https://jsfiddle.net/Le64mxea/3/

Any suggestion or fix will be helpful.

Answers

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

    Thank you. There does appear to be an issue there. AutoFill isn't happy about the field already being in edit mode, causing overlap.

    I'll look into this. For the moment I think you'd need to disable editOnFocus as a workaround.

    Regards,
    Allan

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

    To be more precisly. Please note that convenient editing does not work well with multi-item editing.
    Disabling this function editOnFocus does not allow to conveniently edit the text, you have to delete and rewrite it. This can even be seen in your example, here:
    https://editor.datatables.net/examples/extensions/excel.html

    But if you enable the editOnFocus function, the multi-item does not work well. This is a kind of vicious circle.

    Pls Allan, could you be so kind to answer when you are going to fix it? Thank you in advance.

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

    When editOnFocus is enabled, the behaviour is actually very similar in terms of the first key stroke (at least for me - Chrome/Linux). You click on the cell and then start typing and it replaces all of the text.

    The key difference is that with editOnFocus, while the text to edit is selected, you can move the cursor.

    Unfortunately I can't say for certain when the fix for this will be available as I'm not yet certain what the fix should be! (other than to make it work obviously!).

    Allan

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0
    edited February 2018

    The problem is with extensions and while editOnFocus is enabled in the same time.

    The editOnFocus option is needed, because I do not want to rewrite whole content every time when I am editing the cell. It would be fine If I could move the cursor inside cell while I am editing. Unfortunately, if this option is on, it causes multi-item editing error while I am using the autoFill extension.

    In your example, they were used these two extensions at the same time (https://editor.datatables.net/examples/extensions/excel.html),
    but they are working without the editOnFocus option, that's why, it works well here.

    I am attaching again my example, in which there are these two extensions and the option editOnFocus is enabled. Please try to fill all cell with Ashton into "last name" column, for instance, and you will see that the rows will be blocked and editing is impossilbe in the entire table.

    https://jsfiddle.net/Le64mxea/3/

    I hope, my explanation helps to be successful because I think now, we have known what is needed to work well.

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

    I agree - unfortunately the two don't currently work together. That is something I will attempt to resolve.

    Allan

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

    I would like to ask if there are any changes in this matter?

  • Marek_OptimaMarek_Optima Posts: 32Questions: 7Answers: 0

    Please let us know what you plan to do with this bug that has appeared. When do you plan to issue a fix for this bug. These two extentions (mulit-item editing and editOnFocus) features is really needed to work well together in our case.
    Thanks in advance for your answer.

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

    A quick follow up on this - I've just committed a new feature to AutoFill that will support Editor's inline editing being active in a cell when the fill is activated. This will be included in AutoFill 2.3.0.

    Allan

This discussion has been closed.