fix bugs.

This commit is contained in:
Ahmed Bouhuolia
2020-04-29 05:11:02 +02:00
parent f4520e4e5c
commit f6c5cae82e
42 changed files with 575 additions and 401 deletions

View File

@@ -11,7 +11,7 @@ export const pickItemsFromIds = (items, ids) => {
export const getCurrentPageResults = (items, pages, pageNumber) => {
const currentPage = pages[pageNumber]
return typeof currentPage == 'undefined' ?
[] : Object.values(pick(items || [], currentPage.ids));
[] : pickItemsFromIds(items, currentPage.ids);
}
export const getCurrentTotalResultsCount = (pagination, name) => {