-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pawan Kumar
authored and
Pawan Kumar
committed
May 10, 2024
1 parent
c70107e
commit c0dc998
Showing
10 changed files
with
45 additions
and
109 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
74 changes: 37 additions & 37 deletions
74
app/client/src/widgets/wds/WDSTableWidget/component/TableBody/context.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 |
---|---|---|
@@ -1,45 +1,45 @@ | ||
import type { | ||
Row as ReactTableRowType, | ||
TableBodyPropGetter, | ||
TableBodyProps, | ||
Row as ReactTableRowType, | ||
TableBodyPropGetter, | ||
TableBodyProps, | ||
} from "react-table"; | ||
import React from "react"; | ||
|
||
import type { HeaderComponentProps } from "../Table"; | ||
import type { ReactTableColumnProps } from "../Constants"; | ||
|
||
export type TableBodyContextType = { | ||
accentColor: string; | ||
borderRadius: string; | ||
multiRowSelection: boolean; | ||
prepareRow?(row: ReactTableRowType<Record<string, unknown>>): void; | ||
selectTableRow?: (row: { | ||
original: Record<string, unknown>; | ||
index: number; | ||
}) => void; | ||
selectedRowIndex: number; | ||
selectedRowIndices: number[]; | ||
columns: ReactTableColumnProps[]; | ||
width: number; | ||
rows: ReactTableRowType<Record<string, unknown>>[]; | ||
primaryColumnId?: string; | ||
isAddRowInProgress: boolean; | ||
getTableBodyProps?( | ||
propGetter?: TableBodyPropGetter<Record<string, unknown>> | undefined, | ||
): TableBodyProps; | ||
totalColumnsWidth?: number; | ||
} & Partial<HeaderComponentProps>; | ||
export const TableBodyContext = React.createContext<TableBodyContextType>({ | ||
accentColor: "", | ||
borderRadius: "", | ||
multiRowSelection: false, | ||
selectedRowIndex: -1, | ||
selectedRowIndices: [], | ||
columns: [], | ||
width: 0, | ||
rows: [], | ||
primaryColumnId: "", | ||
isAddRowInProgress: false, | ||
totalColumnsWidth: 0, | ||
}); | ||
accentColor: string; | ||
borderRadius: string; | ||
multiRowSelection: boolean; | ||
prepareRow?(row: ReactTableRowType<Record<string, unknown>>): void; | ||
selectTableRow?: (row: { | ||
original: Record<string, unknown>; | ||
index: number; | ||
}) => void; | ||
selectedRowIndex: number; | ||
selectedRowIndices: number[]; | ||
columns: ReactTableColumnProps[]; | ||
width: number; | ||
rows: ReactTableRowType<Record<string, unknown>>[]; | ||
primaryColumnId?: string; | ||
isAddRowInProgress: boolean; | ||
getTableBodyProps?( | ||
propGetter?: TableBodyPropGetter<Record<string, unknown>> | undefined, | ||
): TableBodyProps; | ||
totalColumnsWidth?: number; | ||
} & Partial<HeaderComponentProps>; | ||
|
||
export const TableBodyContext = React.createContext<TableBodyContextType>({ | ||
accentColor: "", | ||
borderRadius: "", | ||
multiRowSelection: false, | ||
selectedRowIndex: -1, | ||
selectedRowIndices: [], | ||
columns: [], | ||
width: 0, | ||
rows: [], | ||
primaryColumnId: "", | ||
isAddRowInProgress: false, | ||
totalColumnsWidth: 0, | ||
}); |
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
8 changes: 0 additions & 8 deletions
8
app/client/src/widgets/wds/WDSTableWidget/component/TableStyledWrappers.tsx
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
40 changes: 1 addition & 39 deletions
40
app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/CheckboxCell.tsx
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
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