cruikshj / knockout-select2

Select2 v4 binding handler for Knockout
MIT License
25 stars 16 forks source link

Can't get my observableArray value to update when selecting items #12

Open phinett opened 8 years ago

phinett commented 8 years ago

Is this binding supposed to update my observableArray property when i select new items from my select2 list?

I am using a multi-select dropdown, but my viewmodel is never updated.

I can' see anywhere in this binding which would update the observable property, or is this done somewhere else?

cruikshj commented 8 years ago

Sorry for the delay... didn't see this question until now.

This binding applies select2 to an existing select element. Knockout select bindings can be used to observe changes.

I suggest making your code work with vanilla knockout only on a multiselect select element. Then once everything works as expected, add select2 binding without removing the other bindings.