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.
| Property | Type | Description | Default |
|---|---|---|---|
| actionColumns | ActionColumn<TData>[] | Columns which contain an AdapTable Button - used for performing Actions | undefined |
Action Column
| Property | Type | Description |
|---|---|---|
| actionColumnButton | ActionColumnButton<ActionColumnContext<TData>> |ActionColumnButton<ActionColumnContext<TData>>[] | Button (or list of buttons) to display in the Column |
| actionColumnSettings | ActionColumnSettings | Optional properties to configure the Column (e.g. filterable, resizable) |
| columnId | string | Mandatory 'Id'; if no value set for FriendlyName, this will also be Column name |
| friendlyName | string | How Column appears in Column Header, Menus; if no value set, ColumnId is used |
| rowScope | RowScope | Which types of Rows should contain buttons (i.e. data, grouped, summary) |
Action Column Settings
The Action Column Settings object provides configuration properties:
| Property | Type | Description | Default |
|---|---|---|---|
| autoWidth | boolean | When 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 |
| displayMode | ActionColumnDisplayMode | How 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' |
| dropdownLabel | string | Label on the dropdown trigger when displayMode is 'dropdown' | 'Actions' |
| minWidth | number | Minimum width (in pixels) for the column; also used as the column width when autoWidth is false | |
| resizable | boolean | Whether Column can be resized (by dragging column header edges) | true |
| suppressMenu | boolean | Whether no menu should be shown for this Column header. | false |
| suppressMovable | boolean | Whether if this Column should be movable via dragging | false |
| width | number | Preferred 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:
| Property | Type | Description | Default |
|---|---|---|---|
| buttonStyle | ButtonStyle| ((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) => boolean | Function that disables / enables the button based on its evaluation result | |
| hidden | (button:AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => boolean | Function which sets whether Button is hidden | |
| icon | AdaptableIcon| ((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' |
| label | string | ((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) => void | Function to invoke when button is clicked | |
| tooltip | string | ((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
| Property | Type | Description |
|---|---|---|
| command | ActionButtonCommand | Command to assign to Action Column Button that displays a Row Form |
| adaptableContext | any | Custom application Context provided in AdaptableOptions.adaptableContext |
Action Column API
The Action Column API section of Adaptable API provides programmatic access to Action Columns:
| Method | Returns | Description |
|---|---|---|
| getActionColumnForColumnId(columnId) | ActionColumn | undefined | Returns Action Column with given Id |
| getActionColumns() | ActionColumn[] | Retrieves the Action Columns provided in Action Column Options |