Skip to content

Commit

Permalink
CampaignPublicExpensesGrid.tsx: Fix filtering on date (#1469)
Browse files Browse the repository at this point in the history
Add some padding to the cells too
  • Loading branch information
sashko9807 authored Jul 9, 2023
1 parent d1c4548 commit 078b08f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ export default observer(function CampaignPublicExpensesGrid({ slug }: Props) {
},
{
field: 'spentAt',
type: 'date',
headerName: t('expenses:fields.date'),
headerClassName: classes.gridColumn,
flex: 1,
minWidth: 80,
valueGetter: ({ value }) => value && new Date(value),
renderCell: (params: GridRenderCellParams): React.ReactNode => {
if (!params.row.spentAt) {
return ''
Expand All @@ -108,7 +110,7 @@ export default observer(function CampaignPublicExpensesGrid({ slug }: Props) {
return (
<Tooltip key={file.id} title={file.filename}>
<Link href={expenseFileUrl(file.id)} target="_blank" passHref>
<Button sx={{ minWidth: 0, py: 0, px: 1, paddingBottom: 1 }}>
<Button sx={{ minWidth: 0, py: 0, px: 1 }}>
<FilePresentIcon />
</Button>
</Link>
Expand Down Expand Up @@ -143,7 +145,7 @@ export default observer(function CampaignPublicExpensesGrid({ slug }: Props) {
py: '8px',
},
'&.MuiDataGrid-root--densityStandard .MuiDataGrid-cell': {
paddingTop: '17px',
py: '17px',
},
'&.MuiDataGrid-root--densityComfortable .MuiDataGrid-cell': {
py: '22px',
Expand Down

0 comments on commit 078b08f

Please sign in to comment.