fix filter by name

ref #276
This commit is contained in:
Collin Barrett 2018-02-26 16:23:47 -06:00
parent 47648ffcb2
commit b53fa2fd8f

View file

@ -54,7 +54,7 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
Header: "Languages",
accessor: "languages",
filterable: true,
filterMethod: (filter: any, row: any) => row[filter.id].join().toUpperCase()
filterMethod: (filter: any, row: any) => row[filter.id].map((e: any) => e.name).join().toUpperCase()
.includes(filter.value.toUpperCase()),
sortMethod: (a: any, b: any) => a.join().toUpperCase() > b.join().toUpperCase() ? 1 : -1,
Cell: (cell: any) => <div>{cell.value.map((e: any) => e.name).join(", ")}</div>,