Reset to first page when changing sort by

This commit is contained in:
WithoutPants 2019-10-15 18:15:51 +11:00
parent 9ed941dd35
commit 484bff8d2d

View file

@ -112,6 +112,7 @@ export class ListHook {
function onChangeSortBy(sortBy: string) {
const newFilter = _.cloneDeep(filter);
newFilter.sortBy = sortBy;
newFilter.currentPage = 1;
setFilter(newFilter);
}