From cc93018e67260f220994a7571874ab909e27e31d Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 30 Aug 2020 10:45:59 -0500 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E2=9C=A8=20re-enable=20software?= =?UTF-8?q?=20column?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/listsTable/ListsTable.tsx | 23 ++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/web/src/components/listsTable/ListsTable.tsx b/web/src/components/listsTable/ListsTable.tsx index ab80012c0..20ac84ae5 100644 --- a/web/src/components/listsTable/ListsTable.tsx +++ b/web/src/components/listsTable/ListsTable.tsx @@ -129,17 +129,18 @@ export const ListsTable = (props: RouteComponentProps & Props) => { )} /> )} - {/* {tablePageSize.isNarrowWindow ? null : ( + {tablePageSize.isNarrowWindow ? null : ( title="Software" key="Software" - dataIndex={nameof("syntaxId")} + dataIndex={nameof("syntaxIds")} sorter={(a, b) => { const getSoftwareIds = (l: List) => software .filter( (s: Software) => - s.syntaxIds && s.syntaxIds.includes(l.syntaxId) + s.syntaxIds && + s.syntaxIds.some((i) => l.syntaxIds.includes(i)) ) .map((s) => s.id); return arraySorter(getSoftwareIds(a), getSoftwareIds(b), software); @@ -154,7 +155,9 @@ export const ListsTable = (props: RouteComponentProps & Props) => { {s.name}  ( { visibleLists.filter( - (l) => s.syntaxIds && s.syntaxIds.includes(l.syntaxId) + (l) => + s.syntaxIds && + s.syntaxIds.some((i) => l.syntaxIds.includes(i)) ).length } ) @@ -166,19 +169,21 @@ export const ListsTable = (props: RouteComponentProps & Props) => { software .filter((s: Software) => s.name === value) .flatMap((s) => s.syntaxIds) - .includes(record.syntaxId) + .some((i) => record.syntaxIds.includes(i)) } - render={(syntaxId: number) => - syntaxId ? ( + render={(syntaxIds: number[]) => + syntaxIds ? ( s.syntaxIds && s.syntaxIds.includes(syntaxId) + (s: Software) => + s.syntaxIds && + s.syntaxIds.some((i) => syntaxIds.includes(i)) )} /> ) : null } /> - )} */} + )} {/* {tablePageSize.isNarrowWindow ? null : ( title="Syntax"