mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fixes #167663
## Summary
Fixes the creation of extra empty page at pagination of 5 rows
### Video
cdac6a22
-f239-4b70-b40c-93fc727418a6
Co-authored-by: Julien Lind <julien.lind@elastic.co>
This commit is contained in:
parent
7950fb85ca
commit
1f7fdfdfe4
1 changed files with 2 additions and 1 deletions
|
@ -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 } }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue