Skip to content

[Pagination] unexpected behavior when setting boundaryCount and siblingCount#24749

Description

@jhumpohl
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

1.) When i set the boundaryCount={0} just to show the current page and use the prev and next buttons. The current page is just displayed on the first page or last but isnt displayed when you navigate to any other page.

2.) When i set the boundaryCount={1} and the siblingCount={1} the pages that are shown add up.
a) For example when the current page is on 5 from 10 The shown pages are
< 1 ... 4 [5] 6 ... 10 > thats right.
b) When you are at page 4 it looks like this
< 1 2 3 [4] 5 ... 10 > and should be < 1 ... 3 [4] 5 ...>.
c) When you are at page 1 it looks like this
< [1] 2 3 4 5 ... 10 > and from my opinion should be like this < [1] 2 ... 10 >

Expected Behavior 馃

1.) Show the current page any time :).

2.) a) is ok how it is
b) should be < 1 ... 3 [4] 5 ...>
c) should be < [1] 2 ... 10 >

Steps to Reproduce 馃暪

I used the code Sandbox from the Examples and just changed the Props on the component.

https://codesandbox.io/s/bn7nw
and added the props like described above. For 1) boundaryCount={0} For 2) boundaryCount={1} and the siblingCount={1}

Context 馃敠

Its a Navigation for a Responsive Website with Page Results that need Filters,Limits and navigation. Because its for Phones too it needs to be small sometimes.

Your Environment 馃寧

`npx @material-ui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/envinfo` goes here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready to takeHelp wanted. Guidance available. There is a high chance the change will be acceptedscope: paginationChanges related to the pagination.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions