Skip to main content

afterClear

caution

The afterClear event has been deprecated in v4.3. The event will continue work, but you'd better apply a new approach:

spreadsheet.events.on("afterAction", (actionName, config) => {
if (actionName === "clear") {
console.log(actionName, config);
}
});

For more details about the new concept, see Spreadsheet actions.

Description

Fires after a spreadsheet is cleared

Usage

afterClear: () => void;

Example

const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);

// subscribe on the "afterClear" event
spreadsheet.events.on("afterClear", function(){
console.log("A spreadsheet is cleared");
return false;
});

Changelog: Added in v4.2

Related articles: Event handling