Skip to main content

TableCustomAction

Configuration for custom actions in Table.

Properties

actionType?

optional actionType: TableCustomActionType

Type of custom action


displayName

displayName: string

Display name for the action


getDynamicClassName?

optional getDynamicClassName: Func<CellContext, string>

Function to generate a dynamic class name based on cell context. Receives CellContext as input parameter and should return a CSS class name string.


optional getDynamicLink: Func<CellContext, Promise<string>>

Function to generate a dynamic link based on cell context. Receives CellContext as input parameter and should return a Promise resolving to URL string.


getTemplate()?

optional getTemplate: (props) => Element

Template function to render the cell content. Receives TableCustomActionTemplateProps as input and should return a JSX element.

Parameters

props

TableCustomActionTemplateProps

Returns

Element


icon?

optional icon: string

Icon identifier for the action from iconNames


onCellAction()?

optional onCellAction: (v) => void

Handler function called when action is triggered on a body cell. Receives CellContext as parameter.

Parameters

v

CellContext

Returns

void


onHeaderCellAction()?

optional onHeaderCellAction: (v) => void

Handler function called when action is triggered on a header cell. Receives HeaderCellContext as parameter.

Parameters

v

HeaderCellContext

Returns

void


position?

optional position: TableCustomActionPosition

Position of the action in the table


shouldBeShown?

optional shouldBeShown: Func<undefined | CellContext, boolean>

Function to determine if the action should be shown. Receives CellContext or undefined as input parameter and should return boolean.


shouldTableRefreshAfter?

optional shouldTableRefreshAfter: boolean

Whether the table should refresh after this action is performed. When true, Table's onRefreshItems callback will be called when action is triggered.