// 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";
return <TableCell key={key || index} style={{ width: column.width, minWidth: column.width }}>
{renderHeader ?
renderHeader() :
- filters
+ filters.length > 0
? <DataTableFilters
name={`${name} filters`}
onChange={filters =>
</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)}>