no scrolling on table

This commit is contained in:
2026-04-02 21:14:43 +05:30
parent 004a8a6876
commit 08a84ea63f

View File

@@ -158,7 +158,7 @@ export default function EnhancedTable({
}, [config, onDelete, navigate, onNavigateToResource]);
return (
<Box sx={{ height: 600, width: '100%' }}>
<Box sx={{ width: '100%' }}>
<Box sx={{ display: 'flex', justifyContent: 'space-between', mb: 3, alignItems: 'center' }}>
<Typography variant="h5">{config.pluralLabel}</Typography>
<Button variant="contained" color="primary" onClick={onCreate}>
@@ -168,6 +168,7 @@ export default function EnhancedTable({
<DataGrid
rows={data || []}
columns={columns}
autoHeight
getRowId={(row) => {
const pk = config.primaryKey;
if (row[pk] !== undefined && row[pk] !== null) return row[pk];
@@ -183,7 +184,7 @@ export default function EnhancedTable({
paginationModel: { page: 0, pageSize: 10 },
},
}}
pageSizeOptions={[5, 10, 25]}
pageSizeOptions={[10, 25, 50]}
/>
</Box>
);