diff --git a/packages/eds-data-grid-react/src/EdsDataGrid.tsx b/packages/eds-data-grid-react/src/EdsDataGrid.tsx index 30f23db01a..6b17d838e4 100644 --- a/packages/eds-data-grid-react/src/EdsDataGrid.tsx +++ b/packages/eds-data-grid-react/src/EdsDataGrid.tsx @@ -41,6 +41,7 @@ export function EdsDataGrid({ columnResizeMode, pageSize, rowSelection, + multiRowSelection, selectedRows, enableColumnFiltering, debug, @@ -227,6 +228,7 @@ export function EdsDataGrid({ debugHeaders: debug, debugColumns: debug, enableRowSelection: rowSelection ?? false, + enableMultiRowSelection: multiRowSelection, enableColumnPinning: true, enablePinning: true, getRowId, diff --git a/packages/eds-data-grid-react/src/EdsDataGridProps.ts b/packages/eds-data-grid-react/src/EdsDataGridProps.ts index 0da9d16d37..281feba21d 100644 --- a/packages/eds-data-grid-react/src/EdsDataGridProps.ts +++ b/packages/eds-data-grid-react/src/EdsDataGridProps.ts @@ -34,6 +34,13 @@ type BaseProps = { * @default false */ rowSelection?: boolean | ((row: Row) => boolean) + /** + * Only used if row selection has been enabled via `rowSelection` + * Enables/disables multiple row selection for all rows in the table OR + * A function that given a row, returns whether to enable/disable multiple row selection for that row's children/grandchildren + * @default true + */ + multiRowSelection?: boolean | ((row: Row) => boolean) /** * Callback for when row-selection changes */