diff --git a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx index 94e0dbce9..cfbf10089 100644 --- a/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx +++ b/src/FilterLists.Web.V2/src/components/listsTable/ListsTable.tsx @@ -62,7 +62,13 @@ export const ListsTable = (props: RouteComponentProps & Props) => { : title="Software" dataIndex={nameof("syntaxId")} - width={160} + sorter={(a, b) => { + const getSoftwareIds = (l: List) => props.software.filter((s: Software) => s.syntaxIds.includes(l.syntaxId)).map(s => s.id); + const aSoftwareIds = getSoftwareIds(a); + const bSoftwareIds = getSoftwareIds(b); + return arraySorter(aSoftwareIds, bSoftwareIds, props.software); + }} + width={140} className={styles.nogrow} render={(syntaxId: number) => syntaxId ? s.syntaxIds.includes(syntaxId))} /> : null} />} {tablePageSize.isNarrowWindow