add Langs to grid

This commit is contained in:
Collin Barrett 2018-02-21 05:52:24 -06:00
parent 4846e8f438
commit 652bca7d90

View file

@ -50,6 +50,20 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
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].join().toUpperCase()
.includes(filter.value.toUpperCase()),
sortMethod: (a: any, b: any) => a.join().toUpperCase() > b.join().toUpperCase() ? 1 : -1,
Cell: (cell: any) => <div style={{
display: "inline-block", wordWrap: "break-word" }}>{cell
.value.join(", ")}</div>,
width: 100,
headerClassName: "hidden-xs",
className: "hidden-xs"
},
{
Header: "Details",
accessor: "id",
@ -76,6 +90,7 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
interface IFilterListSummaryDto {
id: number;
name: string;
languages: string[];
viewUrl: string;
}