Added missing clear

ref #91
This commit is contained in:
Nicolai Ort 2021-03-14 19:42:41 +01:00
parent 76be8d5a87
commit 1bc840430f
2 changed files with 8 additions and 4 deletions

View File

@ -220,7 +220,8 @@
showChevron={true}
placeholder={$_('search-for-donor-name-or-id')}
noOptionsMessage={$_('no-donors-found')}
on:select={(selectedValue) => (donor = selectedValue.detail.id)} />
on:select={(selectedValue) => (donor = selectedValue.detail.id)}
on:clear={donor = null} />
</div>
{#if !is_fixed}
<div class="col-span-6">
@ -236,7 +237,8 @@
showChevron={true}
placeholder={$_('search-for-runner-by-name-or-id')}
noOptionsMessage={$_('no-runners-found')}
on:select={(selectedValue) => (runner = selectedValue.detail.id)} />
on:select={(selectedValue) => (runner = selectedValue.detail.id)}
on:clear={runner = null} />
</div>
{/if}
<div class="col-span-6">

View File

@ -219,7 +219,8 @@
placeholder={$_('search-for-donor-name-or-id')}
noOptionsMessage={$_('no-donors-found')}
selectedValue={current_donors.find((d) => (d.id == editable.donor))}
on:select={(selectedValue) => (editable.donor = selectedValue.detail.id)} />
on:select={(selectedValue) => (editable.donor = selectedValue.detail.id)}
on:clear={editable.donor = null}/>
</div>
{#if original_data.responseType == 'DISTANCEDONATION'}
<div class=" w-full">
@ -236,7 +237,8 @@
placeholder={$_('search-for-runner-by-name-or-id')}
noOptionsMessage={$_('no-runners-found')}
selectedValue={undefined || current_runners.find((r) => (r.id = original_data.runner.id))}
on:select={(selectedValue) => (editable.runner == selectedValue.detail.id)} />
on:select={(selectedValue) => (editable.runner == selectedValue.detail.id)}
on:clear={editable.runner = null} />
</div>
{/if}
<div class=" w-full">