KeyTable assumes preOpen is never canceled
KeyTable assumes preOpen is never canceled
KeyTable assumes that all of its calls to inline are successful. This is problematic when a preOpen is canceled by returning false.
This is the problematic code: https://github.com/DataTables/KeyTable/blob/master/js/dataTables.keyTable.js#L373-L392
KeyTable should listen for the open before doing anything. It also needs to have some way of knowing that preOpen was canceled so that it can stop waiting for the form to open.
This discussion has been closed.
Replies
Editor has a similar issue inside
closeIcbGood point! Thank you.
Damn you are good at this ;-).
I'll get that fixed!
Allan
Thanks.
I think you'd be amazed by all the things we're doing with DataTables/Editor/Select/KeyTable for what was supposed to become a simple CRUD application.
When you put all those plugins together the way we do, it becomes easier to spot little problems in each plugin because they create a visible/testable impact on the other plugins.
What I've done is to add a new
cancelOpenevent to Editor (which will be in 1.6.2) and I've updated KeyTable to listen for that event and handle it correctly.I dithered for way longer than I'd like to admit about if I should use an event called
thisOpen(or similar) which would be automatically cleared by Editor ifpreOpendoesn't allow the open to happen. That would make the client code simpler, and I might put it in in future, but it wouldn't be backwards compatible with old versions of KeyTable at all. Both Editor and KeyTable would have to be updated insync otherwise they just wouldn't work.I've also cleared the
closeIcbinternally.Thanks again!
Allan