-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add required paginationLabel prop to TablePagination component's use of Pagination component. #3393
base: release-22.x
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for paragon-openedx-v23 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
src/DataTable/TablePagination.jsx
Outdated
@@ -19,6 +19,7 @@ function TablePagination() { | |||
currentPage={pageIndex + 1} | |||
onPageSelect={(pageNum) => gotoPage(pageNum - 1)} | |||
pageCount={pageCount} | |||
paginationLabel="table pagination" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[consider] It may make sense to define the paginationLabel
string as an i18n-compatible string so it's properly translated for non-English locales; the same could apply to the existing paginationLabel
passed via TablePaginationMinimal
.
For example, defining the table pagination
string with defineMessages
and using intl.formatMessage
to return the translated message to the paginationLabel
prop.
… use of Pagination component This commit fixes a bug with the TablePagination component. This component renders the Pagination component without a paginationLabel prop, which is a required prop of the Pagination component. This commit adds a paginationLabel="table pagination" prop, which matches the prop passed to the PaginationComponent by the TablePaginationMinimal component.
cc4f734
to
fc2baed
Compare
❌ Deploy Preview for paragon-openedx-v22 failed. Why did it fail? →
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-22.x #3393 +/- ##
================================================
+ Coverage 93.42% 93.45% +0.03%
================================================
Files 250 252 +2
Lines 4515 4522 +7
Branches 1017 1052 +35
================================================
+ Hits 4218 4226 +8
+ Misses 294 289 -5
- Partials 3 7 +4 ☔ View full report in Codecov by Sentry. |
Description
This commit fixes a bug with the
TablePagination
component. This component renders thePagination
component without apaginationLabel
prop, which is a required prop of thePagination
component. This commit adds a paginationLabel="table pagination"prop, which matches the prop passed to the
PaginationComponentby the
TablePaginationMinimal` component.Merge Checklist
example
app?Post-merge Checklist