Skip to main content

beforeAdd

fires before adding a cell

beforeAdd: (id: string) => boolean | void;

Parameters:

id: string - the id of a cell

Returns:

Return false to prevent adding of a cell; otherwise, true.

Example

layout.events.on("BeforeAdd", function(id){    // your logic here    return false;});

Related sample: Layout. Events

Change log:

added in v6.2