draw event fired 2x after create

draw event fired 2x after create

Maha80Maha80 Posts: 30Questions: 10Answers: 1

Hi,

the draw event is fired 2 times after submitting the create form. Edit and deleting rows fire draw only once. I am not able to find the source for the 2nd draw. The target id of the event points in both cases to the table instance.

Thank you very much for your help.

Martin

Debug code: oduxix

Replies

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

    Hi Martin,

    Thanks for letting me know about this. I've just committed the fix and it will be in 1.5.3 which will be out soon.

    In the mean time, f you want to apply the fix locally search for:

                var row = dt.row.add( data );
                dt.draw( false );
                __dtHighlight( row.node() );
    

    in the Editor code and remove the dt.draw( false );. The draw is handled by the commit function a couple of functions down from where that code is, and I had neglected to remove it from there.

    Regards,
    Allan

This discussion has been closed.