afterSheetRename
caution
The afterSheetRename 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 === "renameSheet") {
console.log(actionName, config);
}
});
For more details about the new concept, see Spreadsheet actions.
Description
Fires after a sheet is renamed
Usage
afterSheetRename: (sheet: object) => void;
Parameters
The callback of the event takes the following parameters:
sheet
- (required) an object with the name and id of a sheet
Example
const spreadsheet = new dhx.Spreadsheet("spreadsheet", {});
spreadsheet.parse(data);
// subscribe on the "afterSheetRename" event
spreadsheet.events.on("afterSheetRename", function(sheet) {
console.log("The sheet is renamed to", sheet.name );
console.log(sheet);
});
Changelog: Added in v4.1
Related articles: Event handling