Skip to content

Added option numberOfPagesAround#501

Merged
Domino987 merged 5 commits intomaterial-table-core:masterfrom
Azarchaniel:feature/numberOfPagesAround
Mar 6, 2022
Merged

Added option numberOfPagesAround#501
Domino987 merged 5 commits intomaterial-table-core:masterfrom
Azarchaniel:feature/numberOfPagesAround

Conversation

@Azarchaniel
Copy link
Contributor

Related Issue

Show more pages around current page in stepped pagination

Description

I added new option 'numberOfPagesAround'. With that you tell how many pages you want to see around current page in Stepped Pagination.

Impacted Areas in Application

tests/demo/demo.js, tests/demo/demo-components/index.js - added demo
src/material-table.js - passing props
src/prop-types.js - type check with custom Error msg
src/defaults/props.options.js - default value (1)
src/components/MTableSteppedPaginationInner/index.js - actual logic of showing more pages around current page

Additional Notes

My first PR to a public repo, so be merciful, but of course don't be afraid to criticize.

Copy link
Contributor

@Domino987 Domino987 left a comment

Choose a reason for hiding this comment

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

There are a few chages but overall this looks great. Thank you. Could you also add it to the typescript types file?

@Domino987 Domino987 merged commit 5a35e38 into material-table-core:master Mar 6, 2022
@Domino987
Copy link
Contributor

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.

2 participants