Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix total in useInfiniteGetList for empty results #9395

Merged
merged 2 commits into from Oct 26, 2023

Conversation

KislyakovDS
Copy link
Contributor

@KislyakovDS KislyakovDS commented Oct 26, 2023

  • total should return 0 if the data is empty;

Closes #9388

 - total should return 0 if the data is empty;
Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -515,4 +515,36 @@ describe('useInfiniteListController', () => {
});
});
});

describe('checkTotalValue', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
describe('checkTotalValue', () => {

Not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

 - remove test describe after review;
@fzaninotto fzaninotto changed the title Fix total in useInfiniteGetList for issue 9388: Fix total in useInfiniteGetList for empty results Oct 26, 2023
@fzaninotto fzaninotto merged commit 708792b into marmelab:master Oct 26, 2023
10 checks passed
@fzaninotto fzaninotto added this to the 4.15.2 milestone Oct 26, 2023
@fzaninotto
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useInfiniteGetList returns total as undefined, when real value equal to 0
3 participants