From 025e75739d2f38c2948af7040aee0dab942aee10 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 4 Aug 2019 18:56:20 -0500 Subject: [PATCH] adjust column defs --- .../modules/allListsTable/AllListsTable.tsx | 5 ++-- .../src/modules/allListsTable/columnProps.ts | 28 +++++++++++++++++++ .../src/modules/allListsTable/columns.ts | 23 --------------- 3 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts delete 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 14078e2ec..850d2143b 100644 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx @@ -1,7 +1,7 @@ import { Table } from 'antd'; import * as React from "react"; +import { columnProps } from './columnProps'; import { List } from './List'; -import { columns } from './columns'; interface State { data: List[]; @@ -34,7 +34,8 @@ export class AllListsTable extends React.Component<{}, State> { return ( record.id.toString()} dataSource={this.state.data} loading={this.state.loading} diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts b/src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts new file mode 100644 index 000000000..9c5b34197 --- /dev/null +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts @@ -0,0 +1,28 @@ +import { ColumnProps } from "antd/lib/table"; +import { List } from './List'; + +const nameof = (name: Extract): string => name; + +export const columnProps: ColumnProps[] = [ + { + title: 'Name', + dataIndex: nameof("name"), + width: 200, + fixed: 'left' + }, + { + title: 'Description', + dataIndex: nameof("description"), + width: 400 + }, + { + title: 'Languages', + dataIndex: nameof("languageIds"), + width: 400 + }, + { + title: 'Tags', + dataIndex: nameof("tagIds"), + width: 400 + } +]; diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts b/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts deleted file mode 100644 index 238615323..000000000 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ColumnProps } from "antd/lib/table"; -import { List } from './List'; - -const nameof = (name: Extract): string => name; - -export const columns: ColumnProps[] = [ - { - title: 'Name', - dataIndex: nameof("name") - }, - { - title: 'Description', - dataIndex: nameof("description") - }, - { - title: 'Languages', - dataIndex: nameof("languageIds") - }, - { - title: 'Tags', - dataIndex: nameof("tagIds") - } -];