observablehq / inputs

Better input elements
https://observablehq.com/framework/lib/inputs
ISC License
127 stars 34 forks source link

Inputs.bind for multiple select in vanilla HTML #219

Open dleeftink opened 2 years ago

dleeftink commented 2 years ago

Currently, Inputs.bind works fine for Inputs.select when{multiple:true}, but falls back to a single value when binding two vanilla HTML select boxes like so:

source = html`<select multiple><option>Aa</option><option>Bee</option></select>`
target = html`<select multiple><option>Aa</option><option>Bee</option></select>`
Inputs.bind(target, source)

This might be intended behaviour, but it would be useful if selectedOptions for two vanilla select boxes could be bound as well.