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

Added option numberOfPagesAround #501

Merged

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.

@Azarchaniel Azarchaniel requested a review from oze4 as a code owner March 3, 2022 15:03
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?

__tests__/demo/demo-components/index.js Outdated Show resolved Hide resolved
src/components/MTableSteppedPaginationInner/index.js Outdated Show resolved Hide resolved
src/prop-types.js Show resolved Hide resolved
@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.

None yet

2 participants