Skip to content

Commit

Permalink
[Data Grid] Fix logic when pageSize larger than number of rows (#726) (
Browse files Browse the repository at this point in the history
…#825)

* Fix logic when pageSize larger than number of rows



* Remove incorrect fix



* Fix logic when pageSize larger than number of rows



---------


(cherry picked from commit f65b5ca)

Signed-off-by: Sirazh Gabdullin <sirazh.gabdullin@nu.edu.kz>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ce18876 commit 924d90e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ export const OuiDataGridBody: FunctionComponent<OuiDataGridBodyProps> = (
}, [getRowHeight]);

const rowCountToAffordFor = pagination
? pagination.pageSize
? Math.min(pagination.pageSize, rowCount)
: visibleRowIndices.length;
const unconstrainedHeight =
defaultHeight * rowCountToAffordFor + headerRowHeight + footerRowHeight;
Expand Down

0 comments on commit 924d90e

Please sign in to comment.