Skip to content

Commit

Permalink
fix boolean cell display
Browse files Browse the repository at this point in the history
  • Loading branch information
rdonigian committed Dec 20, 2024
1 parent e7c8dad commit b3e373e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Grid/booleanColumn.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Check as CheckIcon, Close as CloseIcon } from '@mui/icons-material';
import { GridColDef } from '@mui/x-data-grid';
import { GridFilterInputBoolean } from './GridFilterInputBoolean';

Expand All @@ -21,4 +22,10 @@ export const booleanColumn = () =>
InputComponent: GridFilterInputBoolean,
},
],
renderCell: ({ value }) =>
value ? (
<CheckIcon color="success" />
) : value === false ? (
<CloseIcon color="error" />
) : null,
} satisfies Partial<GridColDef>);

0 comments on commit b3e373e

Please sign in to comment.