chore: increase the pagination
This commit is contained in:
@@ -21,6 +21,8 @@ export default function Categories() {
|
|||||||
const [rowToDelete, setRowToDelete] = useState(null);
|
const [rowToDelete, setRowToDelete] = useState(null);
|
||||||
const hasLoaded = useRef(false);
|
const hasLoaded = useRef(false);
|
||||||
|
|
||||||
|
const pageSize = 100; // Número de filas por página
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!hasLoaded.current) {
|
if (!hasLoaded.current) {
|
||||||
loadData();
|
loadData();
|
||||||
@@ -205,8 +207,8 @@ export default function Categories() {
|
|||||||
<DataGrid
|
<DataGrid
|
||||||
rows={filteredRows}
|
rows={filteredRows}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
initialState={{ pagination: { paginationModel: { pageSize: 10 } } }}
|
initialState={{ pagination: { paginationModel: { pageSize: pageSize } } }}
|
||||||
pageSizeOptions={[10]}
|
pageSizeOptions={[pageSize]}
|
||||||
disableColumnMenu
|
disableColumnMenu
|
||||||
getRowId={(r) => r?._id || r?.id}
|
getRowId={(r) => r?._id || r?.id}
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
Reference in New Issue
Block a user