X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3dcd0e5228ba58a37e55193f99573845a825693e..e57a8f466cdbaec06d35639cc54241600a6b54e7:/src/components/data-table/data-table.tsx

diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx
index 3cce8f3d..87386d50 100644
--- a/src/components/data-table/data-table.tsx
+++ b/src/components/data-table/data-table.tsx
@@ -35,12 +35,13 @@ export interface DataTableDataProps<T> {
     currentRoute?: string;
 }
 
-type CssRules = "tableBody" | "root" | "content" | "noItemsInfo" | 'tableCell' | 'arrow' | 'arrowButton';
+type CssRules = "tableBody" | "root" | "content" | "noItemsInfo" | 'tableCell' | 'arrow' | 'arrowButton' | 'tableCellWorkflows';
 
 const styles: StyleRulesCallback<CssRules> = (theme: Theme) => ({
     root: {
         overflowX: 'auto',
-        overflowY: 'hidden'
+        overflowY: 'auto',
+        height: 'calc(100vh - 280px)',
     },
     content: {
         display: 'inline-block',
@@ -54,7 +55,19 @@ const styles: StyleRulesCallback<CssRules> = (theme: Theme) => ({
         padding: theme.spacing.unit
     },
     tableCell: {
-        wordWrap: 'break-word'
+        wordWrap: 'break-word',
+        paddingRight: '24px'
+    },
+    tableCellWorkflows: {
+        '&:nth-last-child(2)': {
+            padding: '0px',
+            maxWidth: '48px'
+        },
+        '&:last-child': {
+            padding: '0px',
+            paddingRight: '24px',
+            width: '48px'
+        }
     },
     arrow: {
         margin: 0
@@ -95,13 +108,14 @@ export const DataTable = withStyles(styles)(
 
         renderHeadCell = (column: DataColumn<T>, index: number) => {
             const { name, key, renderHeader, filters, sortDirection } = column;
-            const { onSortToggle, onFiltersChange } = this.props;
-            return <TableCell key={key || index}>
+            const { onSortToggle, onFiltersChange, classes } = this.props;
+            return <TableCell className={classes.tableCell} key={key || index}>
                 {renderHeader ?
                     renderHeader() :
                     countNodes(filters) > 0
                         ? <DataTableFiltersPopover
                             name={`${name} filters`}
+                            mutuallyExclusive={column.mutuallyExclusiveFilters}
                             onChange={filters =>
                                 onFiltersChange &&
                                 onFiltersChange(filters, column)}
@@ -125,14 +139,14 @@ export const DataTable = withStyles(styles)(
             </TableCell>;
         }
 
-        ArrowIcon = ({className, ...props}: SvgIconProps) => (
-            <IconButton component='span' className={this.props.classes.arrowButton}>
-                <ArrowDownwardIcon {...props} className={classnames(className, this.props.classes.arrow)}/>
+        ArrowIcon = ({ className, ...props }: SvgIconProps) => (
+            <IconButton component='span' className={this.props.classes.arrowButton} tabIndex={-1}>
+                <ArrowDownwardIcon {...props} className={classnames(className, this.props.classes.arrow)} />
             </IconButton>
         )
 
         renderBodyRow = (item: any, index: number) => {
-            const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid } = this.props;
+            const { onRowClick, onRowDoubleClick, extractKey, classes, currentItemUuid, currentRoute } = this.props;
             return <TableRow
                 hover
                 key={extractKey ? extractKey(item) : index}
@@ -141,7 +155,7 @@ export const DataTable = withStyles(styles)(
                 onDoubleClick={event => onRowDoubleClick && onRowDoubleClick(event, item)}
                 selected={item === currentItemUuid}>
                 {this.mapVisibleColumns((column, index) => (
-                    <TableCell key={column.key || index} className={classes.tableCell}>
+                    <TableCell key={column.key || index} className={currentRoute === '/workflows' ? classes.tableCellWorkflows : classes.tableCell}>
                         {column.render(item)}
                     </TableCell>
                 ))}
