From dee947a1a3ea653e761410cb4e6cff5ee4010a07 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 26 Feb 2018 16:27:36 -0600 Subject: [PATCH] allow filter by language iso6391 code closes #276 --- src/FilterLists.Web/ClientApp/components/Home.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index 395401ca3..51f999092 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -47,18 +47,20 @@ export class Home extends React.Component, IFilterListsS Header: "Name", accessor: "name", filterable: true, - filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase().includes(filter.value.toUpperCase()), + 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].map((e: any) => e.name).join().toUpperCase() + filterMethod: (filter: any, row: any) => row[filter.id] + .map((e: any) => e.name.concat(e.iso6391)).join().toUpperCase() .includes(filter.value.toUpperCase()), sortMethod: (a: any, b: any) => a.join().toUpperCase() > b.join().toUpperCase() ? 1 : -1, Cell: (cell: any) =>
{cell.value.map((e: any) => e.name).join(", ")}
, - style: { whiteSpace: "inherit"}, + style: { whiteSpace: "inherit" }, width: 100, headerClassName: "hidden-xs", className: "hidden-xs"