diff --git a/spiffworkflow-frontend/src/components/MessageInstanceList.tsx b/spiffworkflow-frontend/src/components/MessageInstanceList.tsx index 26ebacce..f9bdb7c4 100644 --- a/spiffworkflow-frontend/src/components/MessageInstanceList.tsx +++ b/spiffworkflow-frontend/src/components/MessageInstanceList.tsx @@ -19,6 +19,8 @@ type OwnProps = { processInstanceId?: number; }; +const paginationQueryParamPrefix = 'message-list'; + export default function MessageInstanceList({ processInstanceId }: OwnProps) { const [messageIntances, setMessageInstances] = useState([]); const [pagination, setPagination] = useState(null); @@ -32,7 +34,12 @@ export default function MessageInstanceList({ processInstanceId }: OwnProps) { setMessageInstances(result.results); setPagination(result.pagination); }; - const { page, perPage } = getPageInfoFromSearchParams(searchParams); + const { page, perPage } = getPageInfoFromSearchParams( + searchParams, + undefined, + undefined, + paginationQueryParamPrefix + ); let queryParamString = `per_page=${perPage}&page=${page}`; if (processInstanceId) { queryParamString += `&process_instance_id=${processInstanceId}`; @@ -155,7 +162,12 @@ export default function MessageInstanceList({ processInstanceId }: OwnProps) { }; if (pagination) { - const { page, perPage } = getPageInfoFromSearchParams(searchParams); + const { page, perPage } = getPageInfoFromSearchParams( + searchParams, + undefined, + undefined, + paginationQueryParamPrefix + ); let breadcrumbElement = null; if (searchParams.get('process_instance_id')) { breadcrumbElement = ( @@ -187,7 +199,7 @@ export default function MessageInstanceList({ processInstanceId }: OwnProps) { perPage={perPage} pagination={pagination} tableToDisplay={buildTable()} - paginationQueryParamPrefix="message-list" + paginationQueryParamPrefix={paginationQueryParamPrefix} /> );