i'm using Ember.Select view for using select. i want when user want to change item/index of select ember create a confirm so i using this way :
OlapApp.CubeSelectView = Ember.Select.extend({
contentBinding: "controller.content",
optionValuePath: "content.uniqueName",
optionLabelPath: "content.name",
prompt: "Please select a Cube",
valueBinding: "OlapApp.CubeController.test",
theSelectionChanged: function(e) {
var userPropmpt = confirm("this operation Delete All of your work");
if(userPropmpt)
{
this.get('controller').setMeasure(e.get('selection').get('uniqueName'));
}
}.observes('selection')
});
but when user change select item the confrim opened also select item/index changed but i want after user press Ok button of confirm , select item change not when who click on select. here is jsbin sample. for example i try to select 'two' in select so confirm open and ask me but the value of select is changed at this time and dosent wait for confirm.