diff --git a/src/components/DataTable/DataTableRowActions.tsx b/src/components/DataTable/DataTableRowActions.tsx index 38da631..348f42a 100644 --- a/src/components/DataTable/DataTableRowActions.tsx +++ b/src/components/DataTable/DataTableRowActions.tsx @@ -11,7 +11,7 @@ import { import { DynamicActionComponent } from "./DynamicActionComponent"; export const DataTableRowActions = ({ row, column }) => { - if (!column.columnDef.actions.length) return null; + const actions = row.original.actions || column.columnDef.actions; return ( @@ -26,7 +26,7 @@ export const DataTableRowActions = ({ row, column }) => { {/* TODO: here we'd need to filter actions that the user cannot perform, or ideally do this in the BE */} - {column.columnDef.actions + {actions .filter(({ condition_key, condition_value }) => { if (!condition_key && !condition_value) return true;