mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
add default case insensitve sort
ref #244 partiall resolves issue, but would be better for API results to be sorted case insensitve
This commit is contained in:
parent
53c65fbf60
commit
0b68f6bf3a
1 changed files with 3 additions and 1 deletions
|
|
@ -33,12 +33,14 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
|
|||
private static renderFilterListsTable(filterLists: IFilterListSummaryDto[]) {
|
||||
return <ReactTable
|
||||
data={filterLists}
|
||||
defaultSorted={[{id: "name"}]}
|
||||
columns={[
|
||||
{
|
||||
Header: "Name",
|
||||
accessor: "name",
|
||||
filterable: true,
|
||||
filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase().startsWith(filter.value.toUpperCase())
|
||||
filterMethod: (filter: any, row: any) => row[filter.id].toUpperCase().startsWith(filter.value.toUpperCase()),
|
||||
sortMethod: (a: any, b: any) => a.toUpperCase() > b.toUpperCase() ? 1 : -1
|
||||
},
|
||||
{
|
||||
Header: "Details",
|
||||
|
|
|
|||
Loading…
Reference in a new issue