Custom Action Columns
Summary
- A
customControl renders HTML in the cell viarenderHTML - The callback receives
CustomRenderContext(phase,element,adaptableApi) - Return HTML on
'onMount'; returnnullon'onDestroy'for teardown
Use custom with renderHTML when you run the Vanilla (TypeScript) AdapTable bundle and want lightweight markup without a framework component.
Developer Guide
Defining a Custom Control (Vanilla)
actionColumnOptions: {
actionColumns: [
{
columnId: 'language_badge',
friendlyName: 'Badge',
settings: {width: 120, suppressMenu: true},
controls: [
{
type: 'custom',
renderHTML: (context) => {
if (context.phase === 'onDestroy') {
return null;
}
return '<span class="lang-chip">Badge</span>';
},
},
],
},
],
},1
Add Action Column Options
Put the Column in actionColumnOptions.actionColumns.
2
Identify the Column
Supply columnId, optional friendlyName, and optional settings.
3
Set the Control type
Set type to 'custom'.
4
Return HTML from renderHTML
Handle phase === 'onDestroy' first, then return an HTML string for 'onMount'. Use element and adaptableApi for listeners or DOM updates when row-specific behaviour is required.
Action Columns: Custom (Vanilla)
Badgerenders a styled chip viarenderHTMLandCustomRenderContextlifecycle phases
Loading demo…
Note
For row-bound React, Angular, or Vue UI, use the matching AdapTable variant and render or frameworkComponent instead of renderHTML.