-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: row selection when grouping (#302)
- Loading branch information
Fran McDade
authored and
Fran McDade
committed
Jan 1, 2025
1 parent
7b97ccd
commit 8aef566
Showing
7 changed files
with
40 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/components/TableCreator/options/rowSelection/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { RowData, RowSelectionOptions } from "@tanstack/react-table"; | ||
|
||
export const ROW_SELECTION_OPTIONS: Pick< | ||
RowSelectionOptions<RowData>, | ||
"enableRowSelection" | "enableSubRowSelection" | "enableMultiRowSelection" | ||
> = { | ||
enableMultiRowSelection: false, | ||
enableRowSelection: false, | ||
enableSubRowSelection: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { RowData, RowSelectionOptions } from "@tanstack/react-table"; | ||
import { ROW_SELECTION_OPTIONS } from "./constants"; | ||
|
||
export function useRowSelectionOptions< | ||
T extends RowData | ||
>(): RowSelectionOptions<T> { | ||
return { ...(ROW_SELECTION_OPTIONS as RowSelectionOptions<T>) }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters