Action Columns Technical Reference

Summary

  • Action Column Options is used to define Action Columns
  • The Action Column API provides run-time access to Action Columns

Action Column Options

The Action Column Options section of Adaptable Options is used to configure Action Columns.

PropertyTypeDescriptionDefault
actionColumnsActionColumn<TData>[]Columns which contain an AdapTable Button - used for performing Actionsundefined

Action Column

PropertyTypeDescription
actionColumnButtonActionColumnButton<ActionColumnContext<TData>> |ActionColumnButton<ActionColumnContext<TData>>[]Button (or list of buttons) to display in the Column
actionColumnSettingsActionColumnSettingsOptional properties to configure the Column (e.g. filterable, resizable)
columnIdstringMandatory 'Id'; if no value set for FriendlyName, this will also be Column name
friendlyNamestringHow Column appears in Column Header, Menus; if no value set, ColumnId is used
rowScopeRowScopeWhich types of Rows should contain buttons (i.e. data, grouped, summary)

Action Column Settings

The Action Column Settings object provides configuration properties:

PropertyTypeDescriptionDefault
autoWidthbooleanWhen true, estimates column width from button labels/icons (or dropdown label) at setup time. Dynamic labels and icons (functions) are not measured — set width explicitly in those cases.false
displayModeActionColumnDisplayModeHow buttons are rendered in the column. In 'dropdown' mode, per-button buttonStyle and iconPosition are ignored; the trigger uses fixed styling and menu items use the standard list layout (icon, then label).'buttons'
dropdownLabelstringLabel on the dropdown trigger when displayMode is 'dropdown''Actions'
minWidthnumberMinimum width (in pixels) for the column; also used as the column width when autoWidth is false
resizablebooleanWhether Column can be resized (by dragging column header edges)true
suppressMenubooleanWhether no menu should be shown for this Column header.false
suppressMovablebooleanWhether if this Column should be movable via draggingfalse
widthnumberPreferred width (in pixels) for Column; takes precedence over autoWidth and minWidth

Action Column Button

The button in the Action extends the Adaptable Button defined as follows:

PropertyTypeDescriptionDefault
buttonStyleButtonStyle| ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) =>ButtonStyle)Style for Button - can be object or function that provides a ButtonStyle object
disabled(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => booleanFunction that disables / enables the button based on its evaluation result
hidden(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => booleanFunction which sets whether Button is hidden
iconAdaptableIcon| ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) =>AdaptableIcon)Icon for Button - can be object or function that provides a AdaptableIcon object
iconPosition'start' | 'end'Where the icon appears relative to the label'start'
labelstring | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)Label for Button - can be string or function that provides string
onClick(button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => voidFunction to invoke when button is clicked
tooltipstring | ((button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string)Tooltip for Button - can be string or function that provides string

But it also contains a command property useful for wiring up Action Column Commands

PropertyTypeDescription
commandActionButtonCommandCommand to assign to Action Column Button that displays a Row Form
adaptableContextanyCustom application Context provided in AdaptableOptions.adaptableContext

Action Column API

The Action Column API section of Adaptable API provides programmatic access to Action Columns:

MethodReturnsDescription
getActionColumnForColumnId(columnId)ActionColumn | undefinedReturns Action Column with given Id
getActionColumns()ActionColumn[]Retrieves the Action Columns provided in Action Column Options