Bridge integration
This commit is contained in:
parent
42a5e09c94
commit
162390008b
56 changed files with 776 additions and 591 deletions
|
|
@ -10,6 +10,7 @@ interface ListProps {
|
|||
rows: any;
|
||||
columns: GridColDef<any>[];
|
||||
onRowClick?: (id: string) => void;
|
||||
getRowID?: (row: any) => any;
|
||||
buttons?: React.ReactNode;
|
||||
paginate?: boolean;
|
||||
}
|
||||
|
|
@ -19,12 +20,20 @@ export const List: FC<ListProps> = ({
|
|||
rows,
|
||||
columns,
|
||||
onRowClick,
|
||||
getRowID,
|
||||
buttons,
|
||||
paginate = false,
|
||||
}) => {
|
||||
const { h3 } = typography;
|
||||
const { mediumGray, lightGray, veryLightGray, mediumBlue, white, darkGray } =
|
||||
colors;
|
||||
const getRowIDInternal = (row: any) => {
|
||||
if (getRowID) {
|
||||
return getRowID(row);
|
||||
}
|
||||
|
||||
return row.id;
|
||||
};
|
||||
|
||||
return (
|
||||
<Box sx={{ height: "100vh", backgroundColor: lightGray, p: 3 }}>
|
||||
|
|
@ -92,7 +101,7 @@ export const List: FC<ListProps> = ({
|
|||
scrollbarSize={0}
|
||||
disableVirtualization
|
||||
disableColumnMenu
|
||||
onRowClick={(row: any) => onRowClick?.(row.id)}
|
||||
onRowClick={({ row }: any) => onRowClick?.(getRowIDInternal(row))}
|
||||
/>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue