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): don't hide single page number with ellipsis (#1235) #3419

Merged
merged 1 commit into from Oct 24, 2019
Merged

fix(pagination): don't hide single page number with ellipsis (#1235) #3419

merged 1 commit into from Oct 24, 2019

Conversation

reduckted
Copy link
Contributor

Before submitting a pull request, please make sure you have at least performed the following:

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated any applicable tests.
  • added/updated any applicable API documentation.
  • added/updated any applicable demos.

Fixes #1235.

I haven't implemented the complex change of logic that was talked about in this comment, but I have fixed the simple case where a single page number was replaced with an ellipsis. I thought that fixing this would be better than nothing. 😁

You can see this change of behavior in the demo under the Advanced pagination section.

  • The first pagination component would hide page 11 when the selected page was anywhere from 6 to 10.
  • The second pagination component would hide page 2 when the selected page was 5.
  • The second pagination component would hide page 11 when the selected page was 8.

@codecov-io
Copy link

Codecov Report

Merging #3419 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3419      +/-   ##
==========================================
+ Coverage   91.05%   91.07%   +0.01%     
==========================================
  Files          95       95              
  Lines        2774     2778       +4     
  Branches      515      517       +2     
==========================================
+ Hits         2526     2530       +4     
  Misses        189      189              
  Partials       59       59
Flag Coverage Δ
#e2e 55.47% <0%> (-0.08%) ⬇️
#unit 88.14% <100%> (+0.01%) ⬆️
Impacted Files Coverage Δ
src/pagination/pagination.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7324083...bee85c3. Read the comment docs.

@maxokorokov maxokorokov added this to the 5.1.2 milestone Oct 24, 2019
Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR, @reduckted.

@maxokorokov maxokorokov merged commit 410f6ea into ng-bootstrap:master Oct 24, 2019
@reduckted reduckted deleted the 1235-do-not-use-ellipses-to-hide-one-page branch October 30, 2019 10:00
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.

In some cases pagination component hides only one page by ellipsis
3 participants