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(pagination): better protect against invalid inputs #979

Closed

Conversation

maxokorokov
Copy link
Member

Second attempt to improve situation with pagination invalid inputs (related to #898)

  • Added tests for edge cases for collectionSize, page, maxSize and pageSize to see the pagination behaviour
  • Cleaned up ngOnChanges
  • Essentially the main change is:
if (!isNumber(this.pageCount)) {
  this.pageCount = 0;
}

@pkozlowski-opensource
Copy link
Member

@maxokorokov does it fix #898 ?

@pkozlowski-opensource pkozlowski-opensource added this to the alpha.11 milestone Oct 29, 2016
@maxokorokov
Copy link
Member Author

@pkozlowski-opensource yes it should fix it, as we won't emit NaN

Oops, forgot to add the test that checks that 'pageChange' is not emitted for incorrect values when splitting previous pull request. Amended.

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

Successfully merging this pull request may close these issues.

None yet

2 participants