Skip to content

Commit

Permalink
Get items from links as a fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
jsardid committed Aug 5, 2020
1 parent 81fe961 commit 30124aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/components/HalTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const useCollection = (collectionUrl, asyncHeadersHandler, headers = {}, itemsPe
});
const links = response.data?._links;
changeIsLoading(false);
changeTotalCollectionItems(response.data?._count);
changeTotalCollectionItems(
response.data?._count || response.data?._links?._count || undefined
);
changeNavigationFunctions({
next: () => {
changePage(page + 1);
Expand Down

0 comments on commit 30124aa

Please sign in to comment.