Skip to content

Commit

Permalink
[Profiling] Allow paginating all Topn functions (elastic#177926)
Browse files Browse the repository at this point in the history
This PR fixes a bug where the pagination only shows 2 pages (up to 100
items) in the TopN Functions view.

Additionally, the number of items per page are raised from 50 to 100.
  • Loading branch information
rockdaboot authored Mar 4, 2024
1 parent 9f3bab6 commit d0c8504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export function DifferentialTopNFunctionsGrid({
);
}

const rowCount = Math.min(Math.max(sortedBaseRows.length, sortedComparisonRows.length), 100);
const rowCount = Math.max(sortedBaseRows.length, sortedComparisonRows.length);

return (
<>
Expand Down Expand Up @@ -303,7 +303,7 @@ export function DifferentialTopNFunctionsGrid({
}}
pagination={{
pageIndex,
pageSize: 50,
pageSize: 100,
// Left it empty on purpose as it is a required property on the pagination
onChangeItemsPerPage: () => {},
onChangePage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ export const TopNFunctionsGrid = ({
)}
columns={columns}
columnVisibility={{ visibleColumns, setVisibleColumns }}
rowCount={sortedRows.length > 100 ? 100 : sortedRows.length}
rowCount={sortedRows.length}
renderCellValue={RenderCellValue}
sorting={{ columns: [{ id: sortField, direction: sortDirection }], onSort }}
leadingControlColumns={leadingControlColumns}
pagination={{
pageIndex,
pageSize: 50,
pageSize: 100,
// Left it empty on purpose as it is a required property on the pagination
onChangeItemsPerPage: () => {},
onChangePage,
Expand Down

0 comments on commit d0c8504

Please sign in to comment.