reset page back to 1 when applying a filter.

This commit is contained in:
danfunk 2023-05-12 12:15:19 -04:00
parent b7ec540b3c
commit 52d1df5c0f
1 changed files with 3 additions and 1 deletions

View File

@ -737,12 +737,14 @@ export default function ProcessInstanceListTable({
event.preventDefault();
setProcessInitiatorNotFoundErrorText('');
const { page, perPage } = getPageInfoFromSearchParams(
// eslint-disable-next-line prefer-const
let { page, perPage } = getPageInfoFromSearchParams(
searchParams,
undefined,
undefined,
paginationQueryParamPrefix
);
page = 1; // Reset page back to 0
const newReportMetadata = getNewReportMetadataBasedOnPageWidgets();
setListHasBeenFiltered(true);