chore: increase the pagination

This commit is contained in:
Rodolfo Ruiz
2025-09-04 20:38:39 -06:00
parent 2cb7264450
commit c69252cc1a

View File

@@ -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={{