mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: Items data table.
This commit is contained in:
@@ -4,9 +4,10 @@ export const pickItemsFromIds = (items, ids) => {
|
||||
return Object.values(pick(items, ids));
|
||||
}
|
||||
|
||||
export const getCurrentPageResults = (items, page, name) => {
|
||||
const currentPage = page.pages[page.currentPages[name]]
|
||||
return typeof currentPage == 'undefined' ? [] : Object.values(pick(items || [], currentPage.ids))
|
||||
export const getCurrentPageResults = (items, pages, pageNumber) => {
|
||||
const currentPage = pages[pageNumber]
|
||||
return typeof currentPage == 'undefined' ?
|
||||
[] : Object.values(pick(items || [], currentPage.ids));
|
||||
}
|
||||
|
||||
export const getCurrentTotalResultsCount = (pagination, name) => {
|
||||
|
||||
Reference in New Issue
Block a user