Commit dad082ae authored by Dave Pisek's avatar Dave Pisek

Fix security dashboard project selector pagination

This commit changes a mutation within the instance level security
dashboard's project selector to correctly handle data for next-page
fetches.
parent 018e273e
...@@ -171,7 +171,9 @@ export const fetchSearchResultsNextPage = ({ state, dispatch, commit }) => { ...@@ -171,7 +171,9 @@ export const fetchSearchResultsNextPage = ({ state, dispatch, commit }) => {
const searchOptions = { page: nextPage }; const searchOptions = { page: nextPage };
return searchProjects(searchQuery, searchOptions) return searchProjects(searchQuery, searchOptions)
.then(payload => commit(types.RECEIVE_SEARCH_RESULTS_SUCCESS, payload)) .then(payload => {
commit(types.RECEIVE_NEXT_PAGE_SUCCESS, payload);
})
.catch(() => dispatch('receiveSearchResultsError')); .catch(() => dispatch('receiveSearchResultsError'));
}; };
......
...@@ -592,7 +592,7 @@ describe('EE projectSelector actions', () => { ...@@ -592,7 +592,7 @@ describe('EE projectSelector actions', () => {
state, state,
[ [
{ {
type: types.RECEIVE_SEARCH_RESULTS_SUCCESS, type: types.RECEIVE_NEXT_PAGE_SUCCESS,
payload: { data: projects, headers: responseHeaders, pageInfo }, payload: { data: projects, headers: responseHeaders, pageInfo },
}, },
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment