Fix select field value bind

This commit is contained in:
Alice Gaudon 2021-11-22 21:29:54 +01:00
parent e151c9c744
commit 6348692473
1 changed files with 2 additions and 2 deletions

View File

@ -398,10 +398,10 @@
{/each}
</fieldset>
{:else if type === 'select'}
<select name={name} id={fieldId} {...$$restProps} bind:this={input} on:input={handleInput}>
<select name={name} id={fieldId} {...$$restProps} bind:this={input} bind:value={value} on:input={handleInput}>
{#each extraData as option}
<option value={(option.display === undefined || option.value !== undefined) && (option.value || option)}
selected={value === (option.value || option)}>{option.display || option}</option>
>{option.display || option}</option>
{/each}
</select>
<Icon name="chevron-down"/>