diff --git a/CHANGELOG.md b/CHANGELOG.md index c33b2e0d265..cfe26288079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,12 +53,13 @@ - Fix dashboard cron jobs not working [#7016](https://github.com/opencrvs/opencrvs-core/issues/7016) - Fix Check for valid date to handle incomplete marriage declarations [#7017](https://github.com/opencrvs/opencrvs-core/issues/7017) - Fix French translation missing for relationship to informant when trying to correct record, print and issue record [#6341] (https://github.com/opencrvs/opencrvs-core/issues/6341) -- Fix print record page for an unsaved declaration [#6893](https://github.com/opencrvs/opencrvs-core/issues/6893) - Fix dashboard cron jobs not working [#7016](https://github.com/opencrvs/opencrvs-core/issues/7016) -- Fix Reset pagination to default page (1) when location changes in UserList [#6481](https://github.com/opencrvs/opencrvs-core/issues/6481) - Fix client modal glitches on integrations page [#7002](https://github.com/opencrvs/opencrvs-core/issues/7002) - Fix "Print and issue to groom|bride" is added to a different variable [#7066](https://github.com/opencrvs/opencrvs-core/pull/7066) - Fix Removed duplicateTrackingId check in createDuplicateTask method [#7081](https://github.com/opencrvs/opencrvs-core/pull/7081) +- Fix print record page for an unsaved declaration [#6893](https://github.com/opencrvs/opencrvs-core/issues/6893) +- Fix Reset pagination to default page (1) when location changes in UserList [#6481](https://github.com/opencrvs/opencrvs-core/issues/6481) +- Fix client modal glitches on integrations page [#7002] (https://github.com/opencrvs/opencrvs-core/issues/7002) ## Refactor diff --git a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx index 8a9e5ac7d00..34a7659c9ab 100644 --- a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx +++ b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx @@ -84,6 +84,8 @@ import { getLocalizedLocationName } from '@client/utils/locationUtils' import { HOME } from '@client/navigation/routes' const DEFAULT_FIELD_AGENT_LIST_SIZE = 10 +const DEFAULT_PAGE_NUMBER = 1 + const { useState } = React const UserTable = styled(BodyContent)` @@ -269,7 +271,8 @@ function UserListComponent(props: IProps) { selectedUser: null }) - const [currentPageNumber, setCurrentPageNumber] = useState(1) + const [currentPageNumber, setCurrentPageNumber] = + useState(DEFAULT_PAGE_NUMBER) const recordCount = DEFAULT_FIELD_AGENT_LIST_SIZE * currentPageNumber const searchedLocation: ILocation | undefined = offlineOffices.find( ({ id }) => locationId === id @@ -633,6 +636,7 @@ function UserListComponent(props: IProps) { selectedLocationId={locationId} onChangeLocation={(locationId) => { props.goToTeamUserList(locationId) + setCurrentPageNumber(DEFAULT_PAGE_NUMBER) }} requiredLocationTypes={'CRVS_OFFICE'} />