Action Column Command Buttons
Summary
- Action Column Buttons can display dedicated Commands to handle the most frequent use cases
- Most of these leverage the Row Form when clicked
Action Column Buttons can be provided with a Command as an alternative to wiring up onClick.
Note
These are designed to cater for the most common use cases, to reduce development overhead
AdapTable provides 4 Action Column Commands:
| Command | Action when Clicked |
|---|---|
create | Opens a Create Row Form |
clone | Opens a Clone Row Form |
edit | Opens an Edit Row Form |
delete | Deletes the row using row deletion function in GridApi |
Action Column Commands
- This demo includes an Action Column (named
Actions) which contains 3 buttons that are configured with Action Column Commands:CloneEditDelete
Pinning Command Buttons
Action Columns, like all columns in AdapTable, can leverage standard Column Pinning.
This will ensure that the Column containing the Command is always visible.
Action Column Commands Pinned
- This demo provides 2 Action Columns which contain an
EditandDeleteAction Command respectively - The
EditColumn is pinned to the left and theDeleteColumn is pinned to the right - Because they are "normal" buttons we were able to add a label (of "Edit") to the first button
Configuring Command Buttons
Action Column Command Buttons can be configured in exactly the same way as 'normal' buttons.
They can be given a label, tone, variant or custom icon, and can be disabled or hidden.
Note
The only difference is that if no icon is provided, AdapTable will use a default one
Configuring Action Column Commands
- This demo contains 3 Action Column Commands with some custom configuration:
- The
clonebutton is hidden when theLanguageis 'JavaScript' (and has a custom icon) - The
editbutton is disabled when theLanguageis 'HTML' - The
deletebutton tone is different when theLanguageis 'TypeScript'
- The