Return false to cancel changes not working on preEdit

Return false to cancel changes not working on preEdit

flaviaazevedoflaviaazevedo Posts: 2Questions: 2Answers: 0

editor.on( 'preEdit', function (e, json, data, id) {
console.log(editor.field( 'position' ).val());
console.log(data)
return false;
});

This produce changes on the datatables when would shall not.

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    preEdit isn't cancellable - the events page show in brackets which ones are. Without knowing more about your use- case, you would probably want to use preOpen, which is cancellable - you can check action (the third parameter) to see if an edit is taking place,

    Colin

Sign In or Register to comment.