You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: The svelte-select component is not displaying the selected item correctly when the items prop is an array of objects with numeric values. However, it works as expected with string values. When using numeric values, the selected item shows "undefined" instead of the correct label.
Expected Behavior: Irrespective of the data type of the value field in the items array (string or numeric), the svelte-select component should display the label of the selected item correctly.
Steps to Reproduce:
Use the svelte-select component with an items array having numeric values for the value field.
Two ways to reproduce it:
• When the item is set on the OnMount (for example if i'm loading a model from a API) notice that the component displays "undefined" for the selected item.
• If you search the value, then select it, it shows undefined too. If you don't search, just select it from the list, it works.
Problem: The svelte-select component is not displaying the selected item correctly when the items prop is an array of objects with numeric values. However, it works as expected with string values. When using numeric values, the selected item shows "undefined" instead of the correct label.
Expected Behavior: Irrespective of the data type of the value field in the items array (string or numeric), the svelte-select component should display the label of the selected item correctly.
Steps to Reproduce:
Use the svelte-select component with an items array having numeric values for the value field.
Two ways to reproduce it:
• When the item is set on the OnMount (for example if i'm loading a model from a API) notice that the component displays "undefined" for the selected item.
• If you search the value, then select it, it shows undefined too. If you don't search, just select it from the list, it works.
Sample Code:
https://svelte.dev/repl/f203e41b174441a1a217216ce01b0099?version=4.2.8
The text was updated successfully, but these errors were encountered: