Skip to content

Commit

Permalink
Forward multiRowSelection options to tanstack (#3355)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhwaage authored May 22, 2024
1 parent 861d752 commit c8dcb0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/eds-data-grid-react/src/EdsDataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export function EdsDataGrid<T>({
columnResizeMode,
pageSize,
rowSelection,
multiRowSelection,
selectedRows,
enableColumnFiltering,
debug,
Expand Down Expand Up @@ -227,6 +228,7 @@ export function EdsDataGrid<T>({
debugHeaders: debug,
debugColumns: debug,
enableRowSelection: rowSelection ?? false,
enableMultiRowSelection: multiRowSelection,
enableColumnPinning: true,
enablePinning: true,
getRowId,
Expand Down
7 changes: 7 additions & 0 deletions packages/eds-data-grid-react/src/EdsDataGridProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ type BaseProps<T> = {
* @default false
*/
rowSelection?: boolean | ((row: Row<T>) => 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<T>) => boolean)
/**
* Callback for when row-selection changes
*/
Expand Down

0 comments on commit c8dcb0c

Please sign in to comment.