Merge pull request #140 from WithoutPants/issues/122

Reset to first page when changing sort by
This commit is contained in:
Leopere 2019-10-15 10:26:47 -04:00 committed by GitHub
commit 99fd1aed05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}