From 52d1df5c0f00df3968f3f0a1d97db498da075ae1 Mon Sep 17 00:00:00 2001 From: danfunk Date: Fri, 12 May 2023 12:15:19 -0400 Subject: [PATCH] reset page back to 1 when applying a filter. --- .../src/components/ProcessInstanceListTable.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index 8297c3557..0ee6db3ea 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -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);