feat: add My Uploads listing with card and table views
This commit is contained in:
@@ -73,6 +73,7 @@ export interface DataTableProps<TData, TValue> {
|
||||
sorting?: SortingState;
|
||||
onSortingChange?: (sorting: SortingState) => void;
|
||||
enableColumnControls?: boolean;
|
||||
onRowClick?: (row: TData) => void;
|
||||
/** Minimum width (px) for every column unless overridden in the column def. */
|
||||
minColumnSize?: number;
|
||||
}
|
||||
@@ -111,6 +112,7 @@ function DataTableContent<TData, TValue>({
|
||||
emptyTitle = 'No results found.',
|
||||
emptyDescription = 'Try adjusting your filters or search terms.',
|
||||
pagination,
|
||||
onRowClick,
|
||||
sorting: controlledSorting,
|
||||
onSortingChange,
|
||||
enableColumnControls = true,
|
||||
@@ -281,6 +283,8 @@ function DataTableContent<TData, TValue>({
|
||||
<TableRow
|
||||
key={row.id}
|
||||
data-state={row.getIsSelected() && 'selected'}
|
||||
onClick={() => onRowClick?.(row.original)}
|
||||
className={cn(onRowClick && 'cursor-pointer')}
|
||||
>
|
||||
{row.getVisibleCells().map((cell) => {
|
||||
const truncate = shouldTruncateCell(cell.column);
|
||||
|
||||
Reference in New Issue
Block a user