Action Column Should Render Predicate

Predicate User Function which stipulates whether an Action Column button should be displayed.

Definition

handler: (params: ActionColumnRenderParams) => boolean;

The function returns true or false if the Action Column should render for that row.

It receives an ActionColumnRenderParams object which is defined as follows:

PropertyDescription
columnThe ActionColumn being rendered
rowDataThe data in the current row being rendered
rowNodeThe row node being currently rendered

Example

// Predefined Config
export default {
ActionColumn: {
ActionColumns: [
{
ColumnId: 'Action',
ButtonText: 'Click',
ShouldRenderPredicate: 'action',
},
]
},
} as PredefinedConfig;
// Adaptable Options
const adaptableOptions: AdaptableOptions = {
userFunctions: [
{
type: 'ActionColumnShouldRenderPredicate',
name: 'action',
handler(params) {
return params.rowData.counterparty != 'BAML';
},
},
],