Fix select field value bind
This commit is contained in:
parent
e151c9c744
commit
6348692473
@ -398,10 +398,10 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{:else if type === 'select'}
|
{: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}
|
{#each extraData as option}
|
||||||
<option value={(option.display === undefined || option.value !== undefined) && (option.value || 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}
|
{/each}
|
||||||
</select>
|
</select>
|
||||||
<Icon name="chevron-down"/>
|
<Icon name="chevron-down"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user