Added clear event

ref #91
This commit is contained in:
Nicolai Ort 2021-03-15 16:04:47 +01:00
parent 1da15783d5
commit ee0c1496e6
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -220,7 +220,7 @@
noOptionsMessage={$_('no-donors-found')}
selectedValue={current_donors.find((d) => (d.id == editable.donor))}
on:select={(selectedValue) => (editable.donor = selectedValue.detail.id)}
on:clear={editable.donor = null}/>
on:clear={()=>(editable.donor = null)}/>
</div>
{#if original_data.responseType == 'DISTANCEDONATION'}
<div class=" w-full">
@ -238,7 +238,7 @@
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:clear={editable.runner = null} />
on:clear={()=>(editable.runner = null)} />
</div>
{/if}
<div class=" w-full">