DataTables Editor onEsc
DataTables Editor onEsc
Josh_Brooks
Posts: 11Questions: 4Answers: 0
Is there an example of initializing the DataTables Editor 1.4 with the onEsc option? I'm trying to prevent the escape button from closing the editor form.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You could use
formOptions.main
if you are using the main editing form:See also the onEsc documentation.
Allan
I'm using the bubble editor. I tried adding the onEsc function in a number of ways but to no effect. Would this be the correct syntax?
Yes that looks correct. Can you show me how you are calling the
bubble()
method. You could try passing{ onEsc: 'none' }
as the second parameter to that method.Allan
Here is how I am opening the editor form:
Try changing:
to be:
However,
create()
is for the main form editor - it will not triggering the bubble editing that you mentioned you were using before.Allan
So, onEsc doesn't trigger for the bubble form? Is my only option to turn it into a main form?
onEsc
should work okay with Bubble editing. As an example if you load the basic Editor example and then open your browsers' Javascript console and enter:Click on a cell to activate the bubble editor and then try pressing the escape key. It shouldn't close the bubble (it doesn't in my tests such now).
Allan