merge master + cr change
[arvados-workbench2.git] / src / components / data-table / data-table.tsx
index 829bc84ebe86aa348c00f8a8f0c4abd2508403eb..5a6f9e5a5b5337abce7b07d738206cbd84d56c78 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { Table, TableBody, TableRow, TableCell, TableHead, TableSortLabel, StyleRulesCallback, Theme, WithStyles, withStyles, Typography } from '@material-ui/core';
+import { Table, TableBody, TableRow, TableCell, TableHead, TableSortLabel, StyleRulesCallback, Theme, WithStyles, withStyles } from '@material-ui/core';
 import { DataColumn, SortDirection } from './data-column';
 import { DataTableFilters,  DataTableFilterItem } from "../data-table-filters/data-table-filters";
 
@@ -63,7 +63,7 @@ export const DataTable = withStyles(styles)(
             return <TableCell key={key || index} style={{ width: column.width, minWidth: column.width }}>
                 {renderHeader ?
                     renderHeader() :
-                    filters
+                    filters.length > 0
                         ? <DataTableFilters
                             name={`${name} filters`}
                             onChange={filters =>
@@ -74,8 +74,8 @@ export const DataTable = withStyles(styles)(
                         </DataTableFilters>
                         : sortDirection
                             ? <TableSortLabel
-                                active={sortDirection !== SortDirection.None}
-                                direction={sortDirection !== SortDirection.None ? sortDirection : undefined}
+                                active={sortDirection !== SortDirection.NONE}
+                                direction={sortDirection !== SortDirection.NONE ? sortDirection : undefined}
                                 onClick={() =>
                                     onSortToggle &&
                                     onSortToggle(column)}>