Skip to content

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): EventRef

Parameters:

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: EventRefThe event reference.

Example:

leaf.on('group-change', (group) => {
console.log(group);
});