Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (
);
}
}
PaginationRow.defaultPerPageOptions = defaultPerPageOptions;
PaginationRow.defaultProps = {
onChange: () => {},
...Paginator.defaultProps,
};
PaginationRow.propTypes = {
/** page and per-page selection callback */
onChange: PropTypes.func,
pagination: PropTypes.shape({
/** the current page */
page: PropTypes.number,
/** the current per page setting */
perPage: PropTypes.number,
/** per page options */
perPageOptions: PropTypes.array,
}),
...Paginator.propTypes,
};
pagination={
isEmpty(pagination)
? {
page: urlPage,
perPage: urlPerPage || data.perPage,
perPageOptions: data.perPageOptions,
}
: pagination
}
viewType={data.viewType}
itemCount={data.itemCount}
onPageSet={onPageSet}
onPerPageSelect={onPerPageSelect}
disableNext={disableNext}
disablePrev={disablePrev}
messages={translateObject(Paginator.defaultProps.messages)}
className={className}
dropdownButtonId={dropdownButtonId}
{...otherProps}
/>
);
};
return (
);
};
PaginationWrapper.defaultProps = {
onChange: () => {},
viewType: 'list',
...Paginator.defaultProps,
};
PaginationWrapper.propTypes = {
...Paginator.propTypes,
/** page and per-page selection callback */
onChange: PropTypes.func,
/** view type */
viewType: PropTypes.string,
/** pagination */
pagination: PropTypes.shape({
/** the current page */
page: PropTypes.number,
/** the current per page setting */
perPage: PropTypes.number,
/** per page options */
perPageOptions: PropTypes.arrayOf(PropTypes.number),