Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 2fe7c41

Browse files
authored
Merge pull request #92 from dashu-baba/issue-68
fixed issue 68
2 parents cbd5869 + 78cb7a5 commit 2fe7c41

File tree

1 file changed

+6
-1
lines changed
  • src/routes/PositionDetails/components/PositionCandidates

1 file changed

+6
-1
lines changed

src/routes/PositionDetails/components/PositionCandidates/index.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Show a list of position candidates with sort select and pagination.
55
*/
6-
import React, { useMemo, useState, useCallback } from "react";
6+
import React, { useMemo, useState, useCallback, useEffect } from "react";
77
import PT from "prop-types";
88
import _ from "lodash";
99
import CardHeader from "components/CardHeader";
@@ -58,6 +58,11 @@ const populateSkillsMatched = (position, candidate) => ({
5858
const PositionCandidates = ({ position, candidateStatus, updateCandidate }) => {
5959
const { candidates } = position;
6060
const [sortBy, setSortBy] = useState(CANDIDATES_SORT_BY.SKILL_MATCHED);
61+
62+
useEffect(() => {
63+
setPage(1);
64+
}, [candidateStatus])
65+
6166
const filteredCandidates = useMemo(
6267
() =>
6368
_.chain(candidates)

0 commit comments

Comments
 (0)