X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3cb71e5a3dadfaa307dc948f8933e6ca3af4df60..70222e9fc05c3ad515ac290e5cbd6302b4f2efc8:/src/components/data-table/data-table.tsx?ds=sidebyside

diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx
index d9157a6a..a0d047ce 100644
--- a/src/components/data-table/data-table.tsx
+++ b/src/components/data-table/data-table.tsx
@@ -12,6 +12,11 @@ import { countNodes } from '~/models/tree';
 
 export type DataColumns<T> = Array<DataColumn<T>>;
 
+export enum DataTableFetchMode {
+    PAGINATED,
+    INFINITE
+}
+
 export interface DataTableDataProps<T> {
     items: T[];
     columns: DataColumns<T>;
@@ -23,6 +28,8 @@ export interface DataTableDataProps<T> {
     extractKey?: (item: T) => React.Key;
     working?: boolean;
     defaultView?: React.ReactNode;
+    currentItemUuid?: string;
+    currentRoute?: string;
 }
 
 type CssRules = "tableBody" | "root" | "content" | "noItemsInfo" | 'tableCell';
@@ -107,14 +114,15 @@ export const DataTable = withStyles(styles)(
             </TableCell>;
         }
 
-        renderBodyRow = (item: T, index: number) => {
-            const { onRowClick, onRowDoubleClick, extractKey, classes } = this.props;
+        renderBodyRow = (item: any, index: number) => {
+            const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid } = this.props;
             return <TableRow
                 hover
                 key={extractKey ? extractKey(item) : index}
                 onClick={event => onRowClick && onRowClick(event, item)}
                 onContextMenu={this.handleRowContextMenu(item)}
-                onDoubleClick={event => onRowDoubleClick && onRowDoubleClick(event, item)}>
+                onDoubleClick={event => onRowDoubleClick && onRowDoubleClick(event, item)}
+                selected={item === currentItemUuid}>
                 {this.mapVisibleColumns((column, index) => (
                     <TableCell key={column.key || index} className={classes.tableCell}>
                         {column.render(item)}
