elm-community / html-extra

Additional functions for working with Html.
http://package.elm-lang.org/packages/elm-community/html-extra/latest
MIT License
31 stars 14 forks source link

Detect input events on multi-choice select elements #23

Closed woochica closed 4 years ago

woochica commented 4 years ago

Add Html Event attribute onMultiSelect to handle input events on multi-choice select elements.

Html.Events.onInput parses event.target.value that doesn't work with multi-choice select elements. onMultiSelectwill grab the string values of event.target.selectedOptions parsed by targetSelectedOptions on any input event.

woochica commented 4 years ago

Can we use the change event instead of input for this? That'll support Edge v12-78 in addition to 79+.

Sure, good point. I remembered change is only fired when the element loses its focus, but appearently in case of the select element, it gets also fired when "selecting a value from a