Fixed the grid view pagination. (#79717)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
4996020087
commit
0a713d3750
|
@ -54,9 +54,10 @@ const PaginationBar = ({ pagination, onChange }: PaginationBarProps) => {
|
||||||
itemsPerPage={pagination.pageSize}
|
itemsPerPage={pagination.pageSize}
|
||||||
itemsPerPageOptions={pagination.pageSizeOptions}
|
itemsPerPageOptions={pagination.pageSizeOptions}
|
||||||
pageCount={pageCount}
|
pageCount={pageCount}
|
||||||
onChangeItemsPerPage={useCallback((size) => ({ index: 0, size }), [])}
|
onChangeItemsPerPage={useCallback((size) => onChange({ index: 0, size }), [onChange])}
|
||||||
onChangePage={useCallback((index) => ({ index, size: pagination.pageSize }), [
|
onChangePage={useCallback((index) => onChange({ index, size: pagination.pageSize }), [
|
||||||
pagination.pageSize,
|
pagination.pageSize,
|
||||||
|
onChange,
|
||||||
])}
|
])}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue