ActionButtonItemDef Class

Deprecated  in 4.15.0. Use type specific utilities for creating items instead, i.e. ToolbarItemUtilities.createActionItem.

Abstract base class that is used by classes to execute an action when pressed.

Extends

Extended by

Methods

Name Description
constructor(itemProps: ItemProps, onItemExecuted?: OnItemExecutedFunc): ActionButtonItemDef    
execute(): void Called when the action button is invoked by a click or touch  
getDimension(orientation: Orientation): number Determines the dimension in a given orientation  
handleSizeKnown(size: SizeProps): void Called when the size of the action button is initialized and the size is known  

Inherited methods

Name Inherited from Description
setDescription(v: string | StringGetter | ConditionalStringValue): void Inherited ItemDefBase Set the description.
setLabel(v: string | StringGetter | ConditionalStringValue): void Inherited ItemDefBase Set the label.
setTooltip(v: string | StringGetter | ConditionalStringValue): void Inherited ItemDefBase Set the tooltip.
initializeDef(me: ItemDefBase, itemProps: ItemProps): void Static Inherited ItemDefBase  

Properties

Name Type Description
_commandHandler Protected CommandHandler | undefined Command Handler for the action button  
defaultButtonSize Static number The default button size for all action buttons  
parameters any | undefined Parameters passed to the Command Handler  
size SizeProps | undefined Size of the action button, as set by handleSizeKnown  

Inherited properties

Name Type Inherited from Description
applicationData Inherited any | undefined ItemDefBase  
badgeKind Inherited BadgeKind | undefined ItemDefBase  
badgeType Inherited BadgeType | undefined ItemDefBase  
description Accessor Inherited ReadOnly string ItemDefBase Get the description string
iconElement Inherited React.ReactNode | undefined ItemDefBase  
iconSpec Inherited IconSpec | undefined ItemDefBase  
id Accessor Abstract Inherited ReadOnly string ItemDefBase  
isActive Accessor Inherited boolean ItemDefBase  
isDisabled Inherited boolean | ConditionalBooleanValue ItemDefBase  
isHidden Inherited boolean | ConditionalBooleanValue ItemDefBase  
isPressed Inherited boolean ItemDefBase  
label Accessor Inherited ReadOnly string ItemDefBase Get the label string
rawLabel Accessor Inherited ReadOnly string | StringGetter | ConditionalStringValue ItemDefBase Get the label string
tooltip Accessor Inherited ReadOnly string ItemDefBase Get the tooltip string
trayId Accessor Inherited ReadOnly undefined ItemDefBase  

Defined in

Last Updated: 30 January, 2025