mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add Langs to grid
This commit is contained in:
parent
4846e8f438
commit
652bca7d90
1 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue