diff --git a/src/stock-operations/stock-operations-table.resource.tsx b/src/stock-operations/stock-operations-table.resource.tsx index 908624d4..a48cdafc 100644 --- a/src/stock-operations/stock-operations-table.resource.tsx +++ b/src/stock-operations/stock-operations-table.resource.tsx @@ -62,7 +62,7 @@ export function useStockOperationPages(filter: StockOperationFilter) { ); return { - items: items?.results, + items: paginatedItems, totalItems: items?.totalCount, currentPage, currentPageSize, diff --git a/src/stock-sources/stock-sources-items-table.component.tsx b/src/stock-sources/stock-sources-items-table.component.tsx index f59ce10a..50140ab9 100644 --- a/src/stock-sources/stock-sources-items-table.component.tsx +++ b/src/stock-sources/stock-sources-items-table.component.tsx @@ -33,10 +33,10 @@ function StockSourcesItems() { // get sourcess const { items, + totalItems, tableHeaders, currentPage, pageSizes, - paginatedItems, goTo, currentPageSize, setPageSize, @@ -182,7 +182,7 @@ function StockSourcesItems() { page={currentPage} pageSize={currentPageSize} pageSizes={pageSizes} - totalItems={paginatedItems.length} + totalItems={totalItems} onChange={({ pageSize, page }) => { if (pageSize !== currentPageSize) { setPageSize(pageSize); diff --git a/src/stock-sources/stock-sources-items-table.resource.ts b/src/stock-sources/stock-sources-items-table.resource.ts index 6014802b..65976c77 100644 --- a/src/stock-sources/stock-sources-items-table.resource.ts +++ b/src/stock-sources/stock-sources-items-table.resource.ts @@ -41,7 +41,8 @@ export default function useStockSourcesPage(filter: StockOperationFilter) { ); return { - items: items.results, + items: paginatedItems, + totalItems: items?.totalCount, currentPage, currentPageSize, paginatedItems, diff --git a/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx b/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx index f4c43d44..19554c0d 100644 --- a/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx +++ b/src/stock-user-role-scopes/stock-user-role-scopes-items-table.component.tsx @@ -35,10 +35,10 @@ function StockUserRoleScopesItems() { // get user scopes const { items, + totalItems, tableHeaders, currentPage, pageSizes, - paginatedItems, goTo, currentPageSize, setPageSize, @@ -202,7 +202,7 @@ function StockUserRoleScopesItems() { page={currentPage} pageSize={currentPageSize} pageSizes={pageSizes} - totalItems={paginatedItems.length} + totalItems={totalItems} onChange={({ pageSize, page }) => { if (pageSize !== currentPageSize) { setPageSize(pageSize); diff --git a/src/stock-user-role-scopes/stock-user-role-scopes-items-table.resource.ts b/src/stock-user-role-scopes/stock-user-role-scopes-items-table.resource.ts index 9905e717..b647827f 100644 --- a/src/stock-user-role-scopes/stock-user-role-scopes-items-table.resource.ts +++ b/src/stock-user-role-scopes/stock-user-role-scopes-items-table.resource.ts @@ -69,7 +69,8 @@ export default function useStockUserRoleScopesPage( ); return { - items: items.results, + items: paginatedItems, + totalItems: items?.totalCount, currentPage, currentPageSize, paginatedItems,