Make dropdowns (selects) searchable feature/91-searchable_dropdowns #97

Merged
niggl merged 35 commits from feature/91-searchable_dropdowns into dev 2021-03-17 16:05:21 +00:00
Showing only changes of commit dab5bee3c0 - Show all commits

View File

@ -227,17 +227,16 @@
<label <label
for="donor" for="donor"
class="block text-sm font-medium text-gray-700">{$_('runner')}</label> class="block text-sm font-medium text-gray-700">{$_('runner')}</label>
<select <Select
bind:value={runner} 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"
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={(option) => getDonorLabel(option)}
{#each runners as r} getOptionLabel={(option) => getDonorLabel(option)}
<option value={r.id}> itemFilter={(label, filterText, option) => filterDonors(label, filterText, option)}
{r.firstname} items={runners}
{r.middlename || ''} showChevron={true}
{r.lastname} placeholder={$_('search-for-runner-by-name-or-id')}
</option> noOptionsMessage={$_('no-runners-found')}
{/each} on:select={(selectedValue) => (runner = selectedValue.detail.id)} />
</select>
</div> </div>
{/if} {/if}
<div class="col-span-6"> <div class="col-span-6">