small items - when a job card is unwatched it disappears and reappears - All Jobs Page - not a very good UX
Closed this issue · 2 comments
rstan-dev commented
small items - when a job card is unwatched it disappears and reappears - All Jobs Page - not a very good UX
rstan-dev commented
This is likely to do with the onUnwatch prop from AllJobs Page to JobCard - which was designed to remove the JobCard from the watched list - it refetches Jobs and Counts
const refetchJobsAndCounts = async () => {
try {
const { data } = await axiosReq.get(/jobs/?${filter}search=${query}&ordering=${orderingField}
);
setJobs(data);
setStatusCounts(data.status_counts);
} catch (err) {
console.log(err);
}
};
<JobCard
key={job.id} {...job}
setJobs={setJobs}
jobs={jobs}
onUnwatch={refetchJobsAndCounts}/>
rstan-dev commented
tested on 8th December cannot replicate this issue. Closing ticket as resolved.