UserColumnMenuItem

Column Menu Item that is provided by User

TypeScript
export interface

Properties

PropertyTypeDescription
disabledbooleanWhether menu item is disabled
frameworkComponentMenuItemFrameworkComponent<ColumnMenuContext>Optional Framework Component (React, Angular or Vue) used to render the content of this menu item.
hiddenbooleanWhether menu item is hidden
iconAdaptableIconOptional icon to display
labelstringText to appear in the Menu Item
menuItemParamsRecord<string, unknown>Extra parameters passed through to the Framework Component (alongside adaptableApi and menuContext).
menuType'User'Type of Menu - always 'User'
onClick(menuContext:ColumnMenuContext) => voidFunction invoked when the Menu Item is clicked
subMenuItemsCustomColumnMenuItem[]Array of Menu Items, enabling limitless levels of menus

Property Details

disabled

Whether menu item is disabled

TypeScript
disabled?: boolean;
Property Value

boolean

frameworkComponent

Optional Framework Component (React, Angular or Vue) used to render the content of this menu item.

When supplied, AG Grid renders the component inside the menu row using its own framework adapter. The component receives AG Grid's CustomMenuItemProps, with the AdapTable-specific extras (adaptableApi, menuContext, plus anything passed via menuItemParams) available as props.menuItemParams.

Supported in the React, Vue and Angular variants of AdapTable.

For Vue, supply a factory that returns the Vue Component (NOT a render call), e.g. ({ adaptableApi }) => MyMenuItem. AG Grid Vue then instantiates the component using its own framework adapter and passes name, icon, menuItemParams, ... as props.

For Angular, supply { type: MyMenuItemComponent } where the component implements IMenuItemAngularComp (with agInit(params) to receive params.menuItemParams.adaptableApi and params.menuItemParams.menuContext). The onSetup callback on AngularFrameworkComponent is NOT honoured for menu items because AG Grid owns the component lifecycle.

TypeScript
frameworkComponent?: MenuItemFrameworkComponent<ColumnMenuContext>;
Property Value

MenuItemFrameworkComponent<ColumnMenuContext>

hidden

Whether menu item is hidden

TypeScript
hidden?: boolean;
Property Value

boolean

icon

Optional icon to display

TypeScript
icon?: AdaptableIcon;
Property Value

AdaptableIcon

label

Text to appear in the Menu Item

TypeScript
label: string;
Property Value

string

Extra parameters passed through to the Framework Component (alongside adaptableApi and menuContext).

TypeScript
menuItemParams?: Record<string, unknown>;
Property Value

Record<string, unknown>

Type of Menu - always 'User'

TypeScript
menuType: 'User';
Property Value

'User'

onClick

Function invoked when the Menu Item is clicked

TypeScript
onClick?: (menuContext: ColumnMenuContext) => void;
Property Value

(menuContext:ColumnMenuContext) => void

Array of Menu Items, enabling limitless levels of menus

TypeScript
subMenuItems?: CustomColumnMenuItem[];
Property Value

CustomColumnMenuItem[]