diff --git a/src/components/donations/AddDonationModal.svelte b/src/components/donations/AddDonationModal.svelte index 39b38fd3..3d6e5449 100644 --- a/src/components/donations/AddDonationModal.svelte +++ b/src/components/donations/AddDonationModal.svelte @@ -11,9 +11,8 @@ import Toastify from "toastify-js"; export let modal_open; export let current_donations; - const getOptionLabel = (option) => + const getDonorLabel = (option) => option.firstname + " " + (option.middlename || "") + " " + option.lastname; - const getSelectionLabel = getOptionLabel; function focus(el) { el.focus(); } @@ -209,26 +208,14 @@ - (getDonorLabel(option))} + getOptionLabel= {(option) => (getDonorLabel(option))} + items={donors} + showChevron={true} + placeholder="Search for donor..." + on:select={(selected) => (donor = selected.detail.id)} /> {#if !is_fixed}