beforeCellsValidation
Description
Fires before cells of the swimlane are validated
Usage
beforeCellsValidation: (
swimlaneId: string | number,
action: "move" | "remove" | "add"
) => boolean | void;
Parameters
The callback of the event takes the following parameters:
swimlaneId
- (required) the id of the itemaction
- (required) the type of the action
Returns
Return false
to prevent validation of new cells, otherwise true
Example
// initializing Diagram
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
// loading data
diagram.data.parse(data);
// attaching a handler to the event
diagram.events.on("beforeCellsValidation", (swimlaneId, action) => {
console.log(swimlaneId, action);
return true;
});
Change log: Added in v4.0
Related articles: Configuring Swimlanes