diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx
index 850d2143b..311a4c9a5 100644
--- a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx
+++ b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx
@@ -1,6 +1,6 @@
import { Table } from 'antd';
import * as React from "react";
-import { columnProps } from './columnProps';
+import { nameof } from '../../utils';
import { List } from './List';
interface State {
@@ -32,14 +32,10 @@ export class AllListsTable extends React.Component<{}, State> {
render() {
return (
-
record.id.toString()}
- dataSource={this.state.data}
- loading={this.state.loading}
- />
+ dataSource={this.state.data} rowKey={record => record.id.toString()} loading={this.state.loading}>
+ title="Name" dataIndex={nameof("name")} />
+ title="Description" dataIndex={nameof("description")} />
+
);
}
}
\ No newline at end of file
diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts b/src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts
deleted file mode 100644
index 9c5b34197..000000000
--- a/src/FilterLists.Web.V2/src/modules/allListsTable/columnProps.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-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/utils/index.ts b/src/FilterLists.Web.V2/src/utils/index.ts
new file mode 100644
index 000000000..47426d11c
--- /dev/null
+++ b/src/FilterLists.Web.V2/src/utils/index.ts
@@ -0,0 +1,3 @@
+import { nameof } from './nameof'
+
+export { nameof }
\ No newline at end of file
diff --git a/src/FilterLists.Web.V2/src/utils/nameof.ts b/src/FilterLists.Web.V2/src/utils/nameof.ts
new file mode 100644
index 000000000..82c8d92ce
--- /dev/null
+++ b/src/FilterLists.Web.V2/src/utils/nameof.ts
@@ -0,0 +1,2 @@
+//https://stackoverflow.com/a/50470026/2343739
+export const nameof = (name: Extract): string => name;
\ No newline at end of file