From 652bca7d90d7a1f8456c8f8b81f2e221d719249a Mon Sep 17 00:00:00 2001 From: Collin Barrett Date: Wed, 21 Feb 2018 05:52:24 -0600 Subject: [PATCH] add Langs to grid --- src/FilterLists.Web/ClientApp/components/Home.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index d88f3fcf6..8c35c7604 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -50,6 +50,20 @@ export class Home extends React.Component, IFilterListsS filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase().includes(filter.value.toUpperCase()), sortMethod: (a: any, b: any) => a.toUpperCase() > b.toUpperCase() ? 1 : -1 }, + { + Header: "Languages", + accessor: "languages", + filterable: true, + filterMethod: (filter: any, row: any) => row[filter.id].join().toUpperCase() + .includes(filter.value.toUpperCase()), + sortMethod: (a: any, b: any) => a.join().toUpperCase() > b.join().toUpperCase() ? 1 : -1, + Cell: (cell: any) =>
{cell + .value.join(", ")}
, + width: 100, + headerClassName: "hidden-xs", + className: "hidden-xs" + }, { Header: "Details", accessor: "id", @@ -76,6 +90,7 @@ export class Home extends React.Component, IFilterListsS interface IFilterListSummaryDto { id: number; name: string; + languages: string[]; viewUrl: string; }