I am using materialuI in react js to display data. In image one you can see the number of array/objects is 15 (total users is 15). When I navigate to last page , that means clicking 2 times in change page , the total number of data is shown as 21. but theres only 15 data. (PLEASE refer image 2)second image shows 21 (number) is wrong. theres only 15 rows image of first page of data table
<TablePagination
component="div"
className="material-table__pagination"
count={(list.number) || 0}
rowsPerPage={rowsPerPage}
page={page}
backIconButtonProps={{ 'aria-label': 'Previous Page' }}
nextIconButtonProps={{ 'aria-label': 'Next Page' }}
onChangePage={handleChangePage}
onChangeRowsPerPage={handleChangeRowsPerPage}
rowsPerPageOptions={[5, 10, 15]}
dir="ltr"
SelectProps={{
inputProps: { 'aria-label': 'rows per page' },
native: true
}}
/>