provide default values for pagination
This commit is contained in:
1 parent
a90ed64a6f
commit
cadb9bb951
1 file changed
+5
-5
@@ -6,8 +6,8 @@ import SelectorVertical from "../../../assets/icons/selector-vertical.svg?react"
|
|||||||
|
|
||||||
Pagination.propTypes = {
|
Pagination.propTypes = {
|
||||||
paginationLabel: PropTypes.string, // Label for the pagination.
|
paginationLabel: PropTypes.string, // Label for the pagination.
|
||||||
itemCount: PropTypes.number.isRequired, // Total number of items for pagination.
|
itemCount: PropTypes.number, // Total number of items for pagination.
|
||||||
page: PropTypes.number.isRequired, // Current page index.
|
page: PropTypes.number, // Current page index.
|
||||||
rowsPerPage: PropTypes.number.isRequired, // Number of rows displayed per page.
|
rowsPerPage: PropTypes.number.isRequired, // Number of rows displayed per page.
|
||||||
handleChangePage: PropTypes.func.isRequired, // Function to handle page changes.
|
handleChangePage: PropTypes.func.isRequired, // Function to handle page changes.
|
||||||
handleChangeRowsPerPage: PropTypes.func, // Function to handle changes in rows per page.
|
handleChangeRowsPerPage: PropTypes.func, // Function to handle changes in rows per page.
|
||||||
@@ -29,9 +29,9 @@ const ROWS_PER_PAGE_OPTIONS = [5, 10, 15, 25];
|
|||||||
*/
|
*/
|
||||||
function Pagination({
|
function Pagination({
|
||||||
paginationLabel,
|
paginationLabel,
|
||||||
itemCount,
|
itemCount = 0,
|
||||||
page,
|
page = 0,
|
||||||
rowsPerPage,
|
rowsPerPage = 5,
|
||||||
handleChangePage,
|
handleChangePage,
|
||||||
handleChangeRowsPerPage,
|
handleChangeRowsPerPage,
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
Reference in new issue
Block a user