From d9a298878772a2c5711391ab610cdcf4990528f8 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 4 Aug 2019 17:59:22 -0500 Subject: [PATCH] extract column defs to new file --- .../src/modules/allListsTable/AllListsTable.tsx | 8 +------- .../src/modules/allListsTable/columns.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx index 18deea19b..491c50659 100644 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx @@ -1,13 +1,7 @@ import { Table } from 'antd'; import * as React from "react"; import { List } from './List'; - -const columns = [ - { - title: 'Name', - dataIndex: 'name', - } -]; +import { columns } from './columns'; interface State { data: List[]; diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts b/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts new file mode 100644 index 000000000..b53ec27dc --- /dev/null +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts @@ -0,0 +1,9 @@ +import { ColumnProps } from "antd/lib/table"; +import { List } from './List'; + +export const columns: ColumnProps[] = [ + { + title: 'Name', + dataIndex: 'name', + } +];