-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refresh options in select element #2844
Comments
Not sure I fully understand the issue, I believe you just need to add You may also want to make sure the selection is updated after the ajax call (via Should look something like this: <select bind:value>
<option value=null selected disabled>pick</option>
{#each items as item}
<option value={item} selected={value === item}>{item}</option>
{/each}
</select> It's possible that |
I had the same problem and can confirm that setting additionally |
I do think there's a bug here, but I also think that having the first placeholder-y option have Without this complication though, it does still seem like the appropriate option should be selected when the contents of the |
Agree this is a bug and it would be great if |
Actually, looks like this is a duplicate of #1764, closing. |
Is there any solution for this bug on April 5, 2023?
Naviera
assignN(e.target, 0)}
required
>
-- Naviera --
{#each shippinglinerRates as i}
{i.nombre}
{/each}
I need to highlight that in localhost my code works fine even without this extra code: I've added that for production but it still doesn't work! I have cast the variables to avoid data type inconsistencies but nothing happens... |
I have
<select>
input, with selected value binded and populated.When "option" array is loaded via ajax, svelte can't show selected item from list:
repl: https://svelte.dev/repl/535db77a84dd40f69a06f3f9308f66f7?version=3.4.2
The text was updated successfully, but these errors were encountered: