Fix select field value bind
This commit is contained in:
parent
e151c9c744
commit
6348692473
@ -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"/>
|
||||
|
Loading…
Reference in New Issue
Block a user