Skip to main content

afterClear

caution

The afterClear event was deprecated in v4.3. It still works, but you should apply the 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 article: Event handling