svelecte icon indicating copy to clipboard operation
svelecte copied to clipboard

provided "value" is invalid using fetch with dynamic value

Open webfrank opened this issue 11 months ago • 1 comments

Hi, I have a select like this:

<Svelecte 
    fetch={`/api/dashboard/measures/${tag}?${q}`} 
    fetchCallback={callback}
    placeholder="Select..."
    clearable
    valueField="value"
    labelField="label"
    bind:value 
/>

tag and q will depend on other fields and when they change the select will re-do the fetch but if at any time the value is outside the returned list it gives the warning and value got cleared.

I think the old behavior should be used at least when using a fetch. If not possible to rollback a new option like allowAnyValue could be added to override the standard behavior.

webfrank avatar Jul 28 '23 14:07 webfrank