From ed4ef673a35b8cb53f858f8c4a84f47e52e6894e Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 2 Sep 2019 13:31:10 -0500 Subject: [PATCH] add Tag column filter --- .../src/components/listsTable/ListsTable.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx index ca7dd9c64..1e84e9f51 100644 --- a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx +++ b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx @@ -129,6 +129,13 @@ export const ListsTable = (props: RouteComponentProps & Props) => { sorter={(a, b) => arraySorter(a.tagIds, b.tagIds, tags)} width={275} className={styles.nogrow} + filters={tags.map(t => ({ + text: {t.name}, + value: t.id.toString() + }))} + onFilter={(value, record) => record.tagIds + ? record.tagIds.includes(+value) + : false} render={(tagIds: number[]) => tagIds ? tagIds.includes(t.id))} />