sort by name in db rather than on client

closes #244
This commit is contained in:
Collin M. Barrett 2018-08-24 15:23:52 -05:00
parent 811bd5a19d
commit 98c7eb206f
2 changed files with 1 additions and 2 deletions

View file

@ -19,7 +19,7 @@ public FilterListService(FilterListsDbContext dbContext, IConfigurationProvider
}
public async Task<IEnumerable<ListSummaryDto>> GetAllSummariesAsync() =>
await DbContext.FilterLists.OrderBy(l => l.Name).ProjectTo<ListSummaryDto>(MapConfig).ToListAsync();
await DbContext.FilterLists.OrderBy(l => l.Name.ToLower()).ProjectTo<ListSummaryDto>(MapConfig).ToListAsync();
public async Task<ListDetailsDto> GetDetailsAsync(uint id) =>
await DbContext.FilterLists.ProjectTo<ListDetailsDto>(MapConfig)

View file

@ -87,7 +87,6 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
private static renderFilterListsTable(state: IHomeState) {
return <ReactTable
data={state.lists}
defaultSorted={[{ id: "name" }]}
key={state.pageSize}
defaultPageSize={state.pageSize}
showPageSizeOptions={false}