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