Fix role filtering

This commit is contained in:
rxdn 2024-09-14 22:33:29 +01:00
parent 69d63b43e4
commit 8030340371
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@
searchable={searchable}
clearable={isClearable}
itemId={optionIdentifier}
label={labelProperty}
debounceWait={loadOptionsInterval}
{loadOptions}
{placeholder}
@ -50,6 +51,7 @@
export let disabled = false;
export let optionIdentifier;
export let labelProperty;
export let nameMapper = (x) => x;
let searchable = isSearchable && selectedValue == undefined;

View File

@ -3,7 +3,7 @@
{/if}
<WrappedSelect {placeholder} optionIdentifier="id" items={roles} {disabled}
bind:selectedValue={value} nameMapper={labelMapper} on:change />
bind:selectedValue={value} nameMapper={labelMapper} labelProperty="name" on:change />
<script>
import {onMount} from 'svelte'