Home > @i2analyze/notebook-sdk > commands > IDynamicGroupConfigBase
commands.IDynamicGroupConfigBase interface
Configuration shared by the commands.IDynamicGroupConfig variants.
Signature:
interface IDynamicGroupConfigBase<TCommandType extends CommandType = CommandType>
Introduced: version 1.10
Type Parameters
| Parameter | Type | Description |
|---|---|---|
| TCommandType | extends CommandType(default: CommandType) | The type of the command-context for the group, which determines what payload is passed to {@link commands.IDynamicGroupConfigBase.onPopulate} and what event API is passed to {@link commands.IDynamicGroupConfigBase.onSurface}. |
Remarks
The fields common to the collapsed commands.IStandardDynamicGroup and the split-button commands.ICommandDynamicGroup. A dynamic group solves the limitation that commands can only be created during plug-in initialization. Instead, the commands.IDynamicGroupConfigBase.onPopulate() callback is called each time the group is opened, allowing commands to be created based on the current application state. The group's popup-button state (label, icon, enabled, hidden) can be driven separately by an optional commands.IDynamicGroupConfigBase.onSurface() callback that runs once when the group is surfaced on a host.
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| context |
readonly
| TCommandType | Gets the command-context type for the group. |
| icon? |
readonly
| IIcon | (Optional) Gets the icon of the group. |
| id |
readonly
| GroupId | Gets the identifier of the group. This must be a non-empty string. |
| label |
readonly
| string | Gets the label of the group, which is displayed as the button/menu-entry title. |
Methods
| Method | Description |
|---|---|
| onPopulate(commandArea, context, signal) | Populates the group's commands each time the group is opened. |
| onSurface(groupAction, eventApi, signal)? | (Optional) Runs when the dynamic group's popup button is surfaced, enabling its state to be driven from events. |