diff --git a/src/components/DataTable/DataTable.stories.tsx b/src/components/DataTable/DataTable.stories.tsx index 2e7a7a4..54fd716 100644 --- a/src/components/DataTable/DataTable.stories.tsx +++ b/src/components/DataTable/DataTable.stories.tsx @@ -228,6 +228,7 @@ export const Grouped: Story = { header: 'Status' } ], + enableResizing: false, header: 'Internal' }, { @@ -241,15 +242,32 @@ export const Grouped: Story = { header: 'Amount' } ], + enableResizing: false, header: 'Details' } ], + data: createData(100), onRowDoubleClick(row) { alert(`row with ID ${row.id} double clicked`); }, onSearchChange: () => { return; - } + }, + rowActions: [ + { + label: 'Modify', + onSelect: () => { + alert('Modify'); + } + }, + { + destructive: true, + label: 'Delete', + onSelect: () => { + alert('Delete'); + } + } + ] } }; diff --git a/src/components/DataTable/DataTableBody.tsx b/src/components/DataTable/DataTableBody.tsx index c515a69..4c7d8f9 100644 --- a/src/components/DataTable/DataTableBody.tsx +++ b/src/components/DataTable/DataTableBody.tsx @@ -63,7 +63,11 @@ export const DataTableBody: React.FC< } const content = flexRender(cell.column.columnDef.cell, cell.getContext()); return ( -