Skip to content
Snippets Groups Projects
Commit 5b8fdcf3 authored by esikkala's avatar esikkala
Browse files

Paginated results: fix pagesize datatype

parent 0560029b
No related branches found
No related tags found
No related merge requests found
...@@ -77,10 +77,10 @@ const fetchPaginatedResultsEpic = (action$, state$) => action$.pipe( ...@@ -77,10 +77,10 @@ const fetchPaginatedResultsEpic = (action$, state$) => action$.pipe(
const params = stateToUrl({ const params = stateToUrl({
facets: state[`${facetClass}Facets`].facets, facets: state[`${facetClass}Facets`].facets,
facetClass: null, facetClass: null,
page: page, page,
pagesize: pagesize, pagesize,
sortBy: sortBy, sortBy,
sortDirection: sortDirection sortDirection
}) })
const requestUrl = `${apiUrl}/faceted-search/${resultClass}/paginated` const requestUrl = `${apiUrl}/faceted-search/${resultClass}/paginated`
// https://rxjs-dev.firebaseapp.com/api/ajax/ajax // https://rxjs-dev.firebaseapp.com/api/ajax/ajax
......
...@@ -21,7 +21,7 @@ export const stateToUrl = ({ ...@@ -21,7 +21,7 @@ export const stateToUrl = ({
const params = {} const params = {}
if (facetClass !== null) { params.facetClass = facetClass } if (facetClass !== null) { params.facetClass = facetClass }
if (page !== null) { params.page = page } if (page !== null) { params.page = page }
if (pagesize !== null) { params.pagesize = pagesize } if (pagesize !== null) { params.pagesize = parseInt(pagesize) }
if (sortBy !== null) { params.sortBy = sortBy } if (sortBy !== null) { params.sortBy = sortBy }
if (sortDirection !== null) { params.sortDirection = sortDirection } if (sortDirection !== null) { params.sortDirection = sortDirection }
if (resultFormat !== null) { params.resultFormat = resultFormat } if (resultFormat !== null) { params.resultFormat = resultFormat }
...@@ -123,7 +123,7 @@ export const handleAxiosError = error => { ...@@ -123,7 +123,7 @@ export const handleAxiosError = error => {
export const pickSelectedDatasets = datasets => { export const pickSelectedDatasets = datasets => {
const selected = [] const selected = []
Object.keys(datasets).map(key => { Object.keys(datasets).forEach(key => {
if (datasets[key].selected) { if (datasets[key].selected) {
selected.push(key) selected.push(key)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment