From cfc90adc9d30a0532f1476c046b8e33fb540f6df Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 4 Aug 2019 18:16:01 -0500 Subject: [PATCH] use strongly-typed column dataIndex bindings --- .../src/modules/allListsTable/columns.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts b/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts index b53ec27dc..238615323 100644 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/columns.ts @@ -1,9 +1,23 @@ import { ColumnProps } from "antd/lib/table"; import { List } from './List'; +const nameof = (name: Extract): string => name; + export const columns: ColumnProps[] = [ { title: 'Name', - dataIndex: 'name', + dataIndex: nameof("name") + }, + { + title: 'Description', + dataIndex: nameof("description") + }, + { + title: 'Languages', + dataIndex: nameof("languageIds") + }, + { + title: 'Tags', + dataIndex: nameof("tagIds") } ];