Changed the in table replacement method

This commit is contained in:
Nicolai Ort 2023-05-09 16:29:25 +02:00
parent 4235758a6d
commit d9a47f882c
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -195,9 +195,12 @@
payment_modal_open={active_edits.length > 0}
paid_amount_input={(active_edits[0]?.paidAmount || 0) / 100}
on:created={(event) => {
current_donations[
current_donations.findIndex((d) => d.id === event.detail.donation.id)
].paidAmount = event.detail.donation.paidAmount;
current_donations = current_donations.map((d)=>{
if(d.id === event.detail.donation.id){
d.paidAmount = event.detail.donation.paidAmount;
}
return d;
})
options.update((options) => ({
...options,
data: current_donations,