Firing onchange event when Ember.Select option is changed
I have been trying to bind an event to select element generated via
Ember.Select but I am having no luck. I created a select view like :
AS.ClientSelectView = Ember.Select.extend({
contentBinding:"AS.customerController",
selectionBinding:"AS.SelectedClient.client", optionLabelPath :
"content.name", optionValuePath : "content.id", change: function () {
console.log(AS.SelectedClient.client.get('name')); } }); but when the
change event fires, it does not show the currently selected element's
value but it shows the prior selected options value. Here is the jsbin
link : http://jsbin.com/iSiCUmU/2 Any help will be much appreciated.
Thanks.
No comments:
Post a Comment