beforeEditorEditing

fires before the text value of an item is edited via the inline editor

boolean beforeEditorEditing(string value,string currentValue,string|number id,string key,string|undefined subheaderId){ ... };

Parameters

valuestringthe new value of the item
currentValuestringthe old value of the item
idstring|numberthe id of the item
keystringthe name of the property to be edited
subheaderIdstring|undefinedoptional, the id of the edited subheader of a swimlane

Returns

booleanfalse - to block saving changes after editing an item via the inline editor, otherwise true

Example

diagram.events.on("beforeEditorEditing", (value, id, key, subheaderId) => {
    console.log(value, id, key, subheaderId);
    return true;
});
// For diagram editor
editor.diagram.events.on("beforeEditorEditing", (value, id, key, subheaderId) => {
    console.log(value, id, key, subheaderId);
    return true;
});

Related samples

Change log

Added in v4.0

Back to top