mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
89aeec3641
commit
2a4368b96a
2 changed files with 18 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace FilterLists.Services.FilterList
|
||||
|
|
@ -7,6 +8,7 @@ namespace FilterLists.Services.FilterList
|
|||
public class ListSummaryDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime CreatedDateUtc { get; set; }
|
||||
public IEnumerable<ListLanguagesDto> Languages { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string ViewUrl { get; set; }
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import "isomorphic-fetch";
|
|||
import ReactTable from "react-table"
|
||||
import "react-table/react-table.css"
|
||||
import ListDetails from "./ListDetails";
|
||||
import * as moment from "moment";
|
||||
|
||||
interface IHomeState {
|
||||
lists: IListDto[];
|
||||
|
|
@ -92,6 +93,19 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
|
|||
headerClassName: "d-none d-sm-block",
|
||||
className: "d-none d-sm-block"
|
||||
},
|
||||
{
|
||||
Header: "Added",
|
||||
accessor: "createdDateUtc",
|
||||
filterable: true,
|
||||
filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase()
|
||||
.includes(filter.value.toUpperCase()),
|
||||
sortMethod: (a: any, b: any) => a.join().toUpperCase() > b.join().toUpperCase() ? 1 : -1,
|
||||
Cell: (cell: any) => <div>{moment(cell.value).format("M-D-Y")}</div>,
|
||||
style: { whiteSpace: "inherit" },
|
||||
width: 60,
|
||||
headerClassName: "d-none d-sm-block",
|
||||
className: "d-none d-sm-block"
|
||||
},
|
||||
{
|
||||
Header: "Details",
|
||||
accessor: "id",
|
||||
|
|
@ -134,6 +148,7 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
|
|||
|
||||
interface IListDto {
|
||||
id: number;
|
||||
createdDateUtc: string;
|
||||
name: string;
|
||||
languages: IListLanguageDto[];
|
||||
viewUrl: string;
|
||||
|
|
|
|||
Loading…
Reference in a new issue