From 7ad331da982390e2011424e7761e181ddf0aa03c Mon Sep 17 00:00:00 2001 From: Alexander Petkov Date: Sun, 9 Jul 2023 21:34:50 +0300 Subject: [PATCH] CampaignPublicExpensesGrid.tsx: Fix filtering on date Add some padding to the cells too --- .../client/campaigns/CampaignPublicExpensesGrid.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/client/campaigns/CampaignPublicExpensesGrid.tsx b/src/components/client/campaigns/CampaignPublicExpensesGrid.tsx index f84a1c217..f2f5b78c1 100644 --- a/src/components/client/campaigns/CampaignPublicExpensesGrid.tsx +++ b/src/components/client/campaigns/CampaignPublicExpensesGrid.tsx @@ -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 '' @@ -108,7 +110,7 @@ export default observer(function CampaignPublicExpensesGrid({ slug }: Props) { return ( - @@ -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',