WorkspaceLeaf.on('group-change') method
WorkspaceLeaf › on(‘group-change’)
Official
Handle the group-change event.Signature:
on(name: "group-change", callback: (group: string) => unknown, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "group-change" | Should be 'group-change'. |
| callback | (group: string) => unknown | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Example:
leaf.on('group-change', (group) => { console.log(group);});