iConnor
iConnor

Reputation: 20189

Issue with Ember.Select multiple not updating controller

I have created a little demo, and selectionBinding is only working when multiple="true" is not set.

Here is the code.

{{view Ember.Select multiple=true content=sampleData
       optionValuePath="content.value"
       optionLabelPath="content.label"
       selectionBinding=testBinding}} // Multi select does not update controller

{{view Ember.Select content=sampleData
       optionValuePath="content.value"
       optionLabelPath="content.label"
       selectionBinding=testBinding2}} // Single select does update controller

Example: http://jsbin.com/ojAvIPA/1

Upvotes: 1

Views: 158

Answers (1)

Roy Daniels
Roy Daniels

Reputation: 6309

You can observe arrays in Ember is using .observes('array.@each'). You can also use .observes('array.length') to observe the length of the array.

jsbin: http://jsbin.com/ojAvIPA/5/

Upvotes: 2

Related Questions