rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.26k stars 175 forks source link

bind to justValue (using multiselect) #489

Closed spassvogel closed 1 year ago

spassvogel commented 1 year ago

following up on https://github.com/rob-balfre/svelte-select/issues/338, I cant seem to make it work with a multi-select.

https://svelte.dev/repl/237b01ecd77048589c14612cce15617b?version=3.52.0

As you can see, it initially reads: Selected value for flight.city is null, whereas I want it to say: Selected value for flight.city is ADL,SYD

rob-balfre commented 1 year ago

@spassvogel is read-only ....

https://svelte.dev/repl/7defb54b0e7449969a1e44a75826a797?version=3.52.0

spassvogel commented 1 year ago

Yes I understand that, but is that a technical limitation or a design choice? The ability to databind just to the value seems quite valuable to me. In fact, I believe that this ticket also mentioned databinding.

What is the use of having a read-only value? Quite often one has a value already serialized in some database or something to start off with.

rob-balfre commented 1 year ago

@spassvogel, design choice. Feel free to PR and improve.