parent
fe16c66cf2
commit
48b8dfe973
@ -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();
|
||||
}
|
||||
@ -210,25 +209,13 @@
|
||||
for="donor"
|
||||
class="block text-sm font-medium text-gray-700">{$_('donor')}</label>
|
||||
<Select
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
||||
{getSelectionLabel}
|
||||
{getOptionLabel}
|
||||
containerClasses="rounded-l-md mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
||||
getSelectionLabel= {(option) => (getDonorLabel(option))}
|
||||
getOptionLabel= {(option) => (getDonorLabel(option))}
|
||||
items={donors}
|
||||
showChevron={true}
|
||||
placeholder="Search for donor..."
|
||||
on:select={(selected) => (donor = selected.detail.id)} />
|
||||
|
||||
<!-- <select
|
||||
bind:value={donor}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2">
|
||||
{#each donors as d}
|
||||
<option value={d.id}>
|
||||
{d.firstname}
|
||||
{d.middlename || ''}
|
||||
{d.lastname}
|
||||
</option>
|
||||
{/each}
|
||||
</select> -->
|
||||
</div>
|
||||
{#if !is_fixed}
|
||||
<div class="col-span-6">
|
||||
|
Loading…
x
Reference in New Issue
Block a user