Skip to content

Commit

Permalink
Fix paging
Browse files Browse the repository at this point in the history
  • Loading branch information
gafetinov committed Dec 12, 2023
1 parent 32aa40b commit 54e307a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ export const TasksPageContainer = ({
const onChangeFilter = (value: Partial<RtqMonitoringSearchRequest>) => setRequest({ ...request, ...value });

const isStateCompletelyLoaded = results && availableTaskNames;
const count = request.count || maxTaskCountOnPage;
const offset = request.offset || 0;
const counter = Number((results && results.totalCount) || 0);
const massActionTarget = chosenTasks.size > 0 ? "Chosen" : "All";
Expand Down Expand Up @@ -249,11 +248,11 @@ export const TasksPageContainer = ({
/>
</Fit>
<Fit>
{Math.ceil(counter / count) > 1 && (
{Math.ceil(counter / maxTaskCountOnPage) > 1 && (
<Paging
data-tid="Paging"
activePage={Math.floor(offset / count) + 1}
pagesCount={Math.ceil(Math.min(counter, 10000) / count)}
activePage={Math.floor(offset / maxTaskCountOnPage) + 1}
pagesCount={Math.ceil(Math.min(counter, 10000) / maxTaskCountOnPage)}
onPageChange={goToPage}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.1-prerelease4",
"version": "3.1-prerelease5",
"assemblyVersion": {
"precision": "build"
},
Expand Down

0 comments on commit 54e307a

Please sign in to comment.