cancelOpen
Form open action was cancelled by the preOpen event.
Please note - this property requires the Editor extension for DataTables.
Deprecated!
As of v1.7.3 this feature has been deprecated. This feature has not yet been scheduled for removal, but its use is discouraged and the alternatives discussed below should be used.
The preOpenCancelled event should now be used for naming consistency with the other pre*Cancelled events.
Description
It is possible for an open action triggered by edit(), inline(), etc to be cancelled by the preOpen event. When you are subscribing an open you need to know if preOpen cancelled the opening of the form so you can also remove your open event. This event provides that ability, letting you know when the open was cancelled by preOpen.
Type
function( e, mode, action )
Parameters:
| Name | Type | Optional | |
|---|---|---|---|
| 1 | e | No | |
Event object | |||
| 2 | mode | No | |
Since 1.5: The form type that would have been displayed. This will be one of:
| |||
| 3 | action | No | |
Since 1.5: The editing action that would have been performed. This will be one of:
| |||
Example
Using open and cancelOpen events:
editor
.one('open.myNamespace', function () {
// Remove cancel open
editor.off('cancelOpen.myNamespace');
// Do something...
})
.one('cancelOpen.myNamespace', function () {
editor.off('open.myNamespace');
})
.inline(this);