mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
use qs params when fetching new/updated jobs to preserve filters
This commit is contained in:
@@ -103,13 +103,13 @@ function JobList({
|
|||||||
}, [fetchJobs]);
|
}, [fetchJobs]);
|
||||||
|
|
||||||
const fetchJobsById = useCallback(
|
const fetchJobsById = useCallback(
|
||||||
async (ids, qs = {}) => {
|
async (ids) => {
|
||||||
const params = parseQueryString(qs, location.search);
|
const params = parseQueryString(qsConfig, location.search);
|
||||||
params.id__in = ids.join(',');
|
params.id__in = ids.join(',');
|
||||||
const { data } = await UnifiedJobsAPI.read(params);
|
const { data } = await UnifiedJobsAPI.read(params);
|
||||||
return data.results;
|
return data.results;
|
||||||
},
|
},
|
||||||
[location.search]
|
[location.search] // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
);
|
);
|
||||||
|
|
||||||
const jobs = useWsJobs(results, fetchJobsById, qsConfig);
|
const jobs = useWsJobs(results, fetchJobsById, qsConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user