From ceba702623665c3948fe5372ecf57ba61dae4892 Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Wed, 4 Jul 2018 15:53:18 +0200 Subject: [PATCH] Make DataColum filters type generic Feature #13703 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/components/data-table/data-column.ts | 4 ++-- src/components/data-table/data-table.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/data-table/data-column.ts b/src/components/data-table/data-column.ts index bbfea7ac..0440fe2b 100644 --- a/src/components/data-table/data-column.ts +++ b/src/components/data-table/data-column.ts @@ -4,13 +4,13 @@ import { DataTableFilterItem } from "../data-table-filters/data-table-filters"; -export interface DataColumn { +export interface DataColumn { name: string; selected: boolean; configurable?: boolean; key?: React.Key; sortDirection?: SortDirection; - filters?: DataTableFilterItem[]; + filters?: F[]; render: (item: T) => React.ReactElement; renderHeader?: () => React.ReactElement | null; width?: string; diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx index e96839e5..22ecf4fc 100644 --- a/src/components/data-table/data-table.tsx +++ b/src/components/data-table/data-table.tsx @@ -7,7 +7,7 @@ import { Table, TableBody, TableRow, TableCell, TableHead, TableSortLabel, Style import { DataColumn, SortDirection } from './data-column'; import DataTableFilters, { DataTableFilterItem } from "../data-table-filters/data-table-filters"; -export type DataColumns = Array>; +export type DataColumns = Array>; export interface DataItem { key: React.Key; } -- 2.30.2