From 4806820b03da0233d28c8868659952c6ae0c45ae Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 11 Jul 2024 19:31:18 +0200 Subject: [PATCH] [8.15] [Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049) (#188127) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Backport This will backport the following commits from `main` to `8.15`: - [[Fleet][Cloud] Enrollment token table may show an empty last page #167663 (#188049)](https://github.com/elastic/kibana/pull/188049) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Pratham Shirbhate --- .../fleet/sections/agents/enrollment_token_list_page/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx index 3a21103503ae5..a9adc6140c7c5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/enrollment_token_list_page/index.tsx @@ -128,6 +128,7 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => { const agentPolicy = agentPoliciesById[enrollmentKey.policy_id]; return !agentPolicy?.is_managed; }) || []; + const filteredTotal = rowItems.length; const columns = [ { @@ -294,7 +295,7 @@ export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => { pagination={{ pageIndex: pagination.currentPage - 1, pageSize: pagination.pageSize, - totalItemCount: total, + totalItemCount: filteredTotal, pageSizeOptions, }} onChange={({ page }: { page: { index: number; size: number } }) => {