fix jenkins pagination

Signed-off-by: Lorenzo Orsatti <49567430+lorsatti@users.noreply.github.com>
This commit is contained in:
Lorenzo Orsatti
2021-11-25 00:50:59 +01:00
parent 103ca7ec60
commit 58e197947a
@@ -205,6 +205,10 @@ export const CITableView = ({
onChangePageSize,
total,
}: Props) => {
const projectsInPage = projects?.slice(
page * pageSize,
Math.min(projects.length, (page + 1) * pageSize),
);
return (
<Table
isLoading={loading}
@@ -219,7 +223,7 @@ export const CITableView = ({
onClick: () => retry(),
},
]}
data={projects ?? []}
data={projectsInPage ?? []}
onPageChange={onChangePage}
onRowsPerPageChange={onChangePageSize}
title={