Skip to content

Commit

Permalink
OP-1854: support decimals when filtering by fees or amountReceived
Browse files Browse the repository at this point in the history
  • Loading branch information
olewandowski1 committed Apr 3, 2024
1 parent 82e1949 commit 3e2713a
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/components/BillPaymentsFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,15 @@ const BillPaymentsFilter = ({ classes, filters, onChangeFilters }) => {
label="billPayment.fees"
min={0}
value={filterValue("fees")}
onChange={onChangeFilter("fees")}
onChange={(fee) =>
onChangeFilters([
{
id: "fees",
value: !fee ? null : fee,
filter: fee ? `fees: "${parseFloat(fee)}"` : null,
},
])
}
/>
</Grid>
<Grid item xs={2} className={classes.item}>
Expand All @@ -103,7 +111,15 @@ const BillPaymentsFilter = ({ classes, filters, onChangeFilters }) => {
label="billPayment.amountReceived"
min={0}
value={filterValue("amountReceived")}
onChange={onChangeFilter("amountReceived")}
onChange={(amountReceived) =>
onChangeFilters([
{
id: "amountReceived",
value: !amountReceived ? null : amountReceived,
filter: amountReceived ? `amountReceived: "${parseFloat(amountReceived)}"` : null,
},
])
}
/>
</Grid>
<Grid item xs={2} className={classes.item}>
Expand Down

0 comments on commit 3e2713a

Please sign in to comment.