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

fix: adjust pagination with selectedOption prop on Organizations Details pages #170

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Update pagination selected option in Organization Details pages

## [1.34.0] - 2024-08-20

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const OrganizationDetailsCollections = ({
onNextClick: handleCollectionsNextClick,
onPrevClick: handleCollectionsPrevClick,
onRowsChange: handleRowsChange,
selectedOption: collectionPaginationState.pageSize,
currentItemFrom:
(collectionPaginationState.page - 1) *
collectionPaginationState.pageSize +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ const OrganizationDetailsCostCenters = ({
onNextClick: handleCostCentersNextClick,
onPrevClick: handleCostCentersPrevClick,
onRowsChange: handleCostCentersRowsChange,
selectedOption: costCenterPaginationState.pageSize,
currentItemFrom:
(costCenterPaginationState.page - 1) *
costCenterPaginationState.pageSize +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ const OrganizationDetailsSellers = ({
onNextClick: handleNext,
onPrevClick: handlePrev,
onRowsChange: handleRowsChange,
selectedOption: variables.pageSize,
currentItemFrom: (variables.page - 1) * variables.pageSize + 1,
currentItemTo: Math.min(
variables.page * variables.pageSize,
Expand Down
1 change: 1 addition & 0 deletions react/admin/OrganizationRequestsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ const OrganizationRequestsTable: FunctionComponent = () => {
onNextClick: handleNextClick,
onPrevClick: handlePrevClick,
onRowsChange: handleRowsChange,
selectedOption: pageSize,
currentItemFrom: (page - 1) * pageSize + 1,
currentItemTo: total < page * pageSize ? total : page * pageSize,
textShowRows: formatMessage(messages.showRows),
Expand Down
1 change: 1 addition & 0 deletions react/components/OrganizationsWithoutSalesManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const OrganizationsWithoutSalesManager = () => {
pagination={{
onNextClick: handleNextClick,
onPrevClick: handlePrevClick,
selectedOption: paginationState.tableLength,
currentItemFrom: paginationState.currentItemFrom,
currentItemTo: paginationState.currentItemTo,
onRowsChange: handleRowsChange,
Expand Down
Loading