Inlineedit stops working aftfer editing 1st field

Inlineedit stops working aftfer editing 1st field

VolkhardVVolkhardV Posts: 20Questions: 5Answers: 0
edited July 2020 in Editor

Hello,

on https://customer.vogeler-ag.de/obi/intranet/test/test2 a testing page can be found. It displays the calendar weeks of a year. You can click on a cell and change the color of this cell from a dropdown on clicking on another area >>without<< a cell (e.g. white background) at the page.

But when you click on another cell for bluring, the editing is not possible: you can select color and the page stops working on the blur-event. The dropdown from the first cell is still shown and the 2nd clicked cell-editor is opened again.

can anyone help?

best regards

Volkhard

Replies

  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin

    Hi Volkhard,

    I think it is because server-side processing is being used and this line for initialising the inline editing is tripping it up:

    $('#data').on('click','tbody td',function(e){editor.inline(this, {onBlur:'submit'});});
    

    the issue with passing in this when using server-side processing, is that that cell (which this refers to) no longer exists on the page - when sever-side processing is enabled it does a full draw on each edit.

    Try using this instead:

        $('#data').on( 'click', 'tbody td', function (e) {
            editor.inline( table.cell( this ).index(), {
                onBlur: 'submit'
            } );
        } );
    

    This example has a bit more detail about it.

    Regards,
    Allan

  • VolkhardVVolkhardV Posts: 20Questions: 5Answers: 0

    Hello Alan,

    super - this helps.

    Thanks!

This discussion has been closed.