chore: hide dates and by columns

This commit is contained in:
Rodolfo Ruiz
2025-09-04 20:51:46 -06:00
parent fead820091
commit d699af9d75

View File

@@ -164,10 +164,8 @@ export default function Categories() {
},
{ field: 'tagName', headerName: 'Name', flex: 1.2, minWidth: 180 },
{ field: 'slug', headerName: 'Slug', flex: 1.0, minWidth: 160 },
{ field: 'icon', headerName: 'Icon', flex: 0.7, minWidth: 120 },
// New computed column
{ field: 'icon', headerName: 'Icon', flex: 0.7, minWidth: 250 },
{ field: 'material', headerName: 'Material', flex: 1.2, minWidth: 200 },
// Hidden audit columns
{
field: 'createdAt',
headerName: 'Created Date',
@@ -229,7 +227,17 @@ export default function Categories() {
<DataGrid
rows={filteredRows}
columns={columns}
initialState={{ pagination: { paginationModel: { pageSize: pageSize } } }}
initialState={{
pagination: { paginationModel: { pageSize } },
columns: {
columnVisibilityModel: {
createdAt: false,
createdBy: false,
updatedAt: false,
updatedBy: false,
},
},
}}
pageSizeOptions={[pageSize]}
disableColumnMenu
getRowId={(r) => r?._id || r?.id}