michaelbromley / ngx-pagination

Pagination for Angular
http://michaelbromley.github.io/ngx-pagination/
MIT License
1.21k stars 245 forks source link

maxSize cannot be below 5 #378

Closed MathieuLavigneOpen closed 2 years ago

MathieuLavigneOpen commented 2 years ago

Angular version: 11.0.0

ngx-pagination version: 5.1.1

Description of issue: Current page is not visible if maxSize is below 5

Steps to reproduce: Use pagination in a context where there are at least 5 pages. Set maxSize to 4. Go to middle pages, for instance page 4, with next page button.

Expected result: The current page number is visible no matter the current page.

Actual result: The current page number is not visible when it is in the middle (for instance 3).

Demo: (if possible, edit this StackBlitz demo and paste the link to your fork)

Any relevant code:

Screenshots

Current page = 4/7

maxSize = 5 :

image

maxSize = 4 :

image

Suggested solution

It may be written in the docs that maxSize cannot be below 5.

michaelbromley commented 2 years ago

Thanks for the report. Would you like to create a PR which adds this line to the readme?