react-data-table-component
react-data-table-component copied to clipboard
How to add pagination and Rows per page section to the top and bottom of the datatable?
I have added the following code , But the pagination section is showing only on bottom, Is there any alternate method to show pagination and Rows per page section to the top and bottom of the datatable?
<DataTable
title="List Products"
columns={columns}
data={products.data}
customStyles={customStyles}
noDataComponent={
<div className="no-datatable alert alert-warning">
There is no Items to show.
</div>
}
highlightOnHover
pagination
paginationPosition="top" // both bottom or both
paginationServer
paginationResetDefaultPage={resetPage}
paginationTotalRows={products.total}
paginationPerPage={perPage}
paginationRowsPerPageOptions={[25,50,100,250]}
paginationComponentOptions={{}}
onChangePage={page => {
setPage(page)
}}
onChangeRowsPerPage={page => {
setPage(1);
setPerpage(page)
}}
/>
paginationPosition doesn't seem to be implemented yet or am I missing it? Hoping this feature gets implemented as many would prefer the pagination at the top or to have a "both" option would be ideal.