From 58e197947a18e6168fd839e4aea5134f5f50a7ea Mon Sep 17 00:00:00 2001 From: Lorenzo Orsatti <49567430+lorsatti@users.noreply.github.com> Date: Thu, 25 Nov 2021 00:50:59 +0100 Subject: [PATCH 1/2] fix jenkins pagination Signed-off-by: Lorenzo Orsatti <49567430+lorsatti@users.noreply.github.com> --- .../src/components/BuildsPage/lib/CITable/CITable.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx index 39187fe859..b1eaf2c24c 100644 --- a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -205,6 +205,10 @@ export const CITableView = ({ onChangePageSize, total, }: Props) => { + const projectsInPage = projects?.slice( + page * pageSize, + Math.min(projects.length, (page + 1) * pageSize), + ); return ( retry(), }, ]} - data={projects ?? []} + data={projectsInPage ?? []} onPageChange={onChangePage} onRowsPerPageChange={onChangePageSize} title={ From ad433b346ffea0fcc29cc76fddeac1ada63e106e Mon Sep 17 00:00:00 2001 From: Lorenzo Orsatti <49567430+lorsatti@users.noreply.github.com> Date: Thu, 25 Nov 2021 00:54:41 +0100 Subject: [PATCH 2/2] add changeset Signed-off-by: Lorenzo Orsatti <49567430+lorsatti@users.noreply.github.com> --- .changeset/eleven-suns-type.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eleven-suns-type.md diff --git a/.changeset/eleven-suns-type.md b/.changeset/eleven-suns-type.md new file mode 100644 index 0000000000..b16f26c968 --- /dev/null +++ b/.changeset/eleven-suns-type.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-jenkins': patch +--- + +Fix Jenkins project table pagination.