change list clients in page admin
This commit is contained in:
parent
e3f73ac2dd
commit
d43fc619d5
@ -233,9 +233,6 @@ export default function ClientTable({
|
|||||||
const [search, setSearch] = useState('')
|
const [search, setSearch] = useState('')
|
||||||
const [units, setUnits] = useState([])
|
const [units, setUnits] = useState([])
|
||||||
|
|
||||||
// Avoid a layout jump when reaching the last page with empty rows.
|
|
||||||
const emptyRows =
|
|
||||||
page > 0 ? Math.max(0, (1 + page) * rowsPerPage - clients.length) : 0
|
|
||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
|
|
||||||
@ -244,6 +241,10 @@ export default function ClientTable({
|
|||||||
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Avoid a layout jump when reaching the last page with empty rows.
|
||||||
|
const emptyRows =
|
||||||
|
page > 0 ? Math.max(0, (1 + page) * rowsPerPage - listClients.length) : 0
|
||||||
|
|
||||||
const imageURLS = images.map((img) => URL.createObjectURL(img))
|
const imageURLS = images.map((img) => URL.createObjectURL(img))
|
||||||
|
|
||||||
// const handleOpen = () => setOpen(true)
|
// const handleOpen = () => setOpen(true)
|
||||||
@ -402,7 +403,7 @@ export default function ClientTable({
|
|||||||
orderBy={orderBy}
|
orderBy={orderBy}
|
||||||
onSelectAllClick={handleSelectAllClick}
|
onSelectAllClick={handleSelectAllClick}
|
||||||
onRequestSort={handleRequestSort}
|
onRequestSort={handleRequestSort}
|
||||||
rowCount={clients.length}
|
rowCount={listClients.length}
|
||||||
/>
|
/>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{listClients.map((row, index) => {
|
{listClients.map((row, index) => {
|
||||||
@ -492,7 +493,7 @@ export default function ClientTable({
|
|||||||
<TablePagination
|
<TablePagination
|
||||||
rowsPerPageOptions={[5, 10, 25]}
|
rowsPerPageOptions={[5, 10, 25]}
|
||||||
component="div"
|
component="div"
|
||||||
count={clients.length}
|
count={listClients.length}
|
||||||
rowsPerPage={rowsPerPage}
|
rowsPerPage={rowsPerPage}
|
||||||
page={page}
|
page={page}
|
||||||
onPageChange={handleChangePage}
|
onPageChange={handleChangePage}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user