Ember: Prevent Link-to From Firing When An Action Within It Is Clicked
I have a table where I want users to navigate to specific items when they click a row, but the row may contain other elements (such as checkboxes) that trigger actions but do not t
Solution 1:
That works when you attach an action to an element, the input helper doesn't support action='foo'
in that manner. It isn't even being hit at all.
http://emberjs.jsbin.com/lugatite/1/edit
You'll need to roll you're own checkbox, or just observe the checked value in your controller
App.MyCheckBox = Ember.Checkbox.extend(Ember.TargetActionSupport, {
target: Ember.computed.alias('controller'),
action: 'save',
actionContext: Ember.computed.alias('context'),
click: function(el) {
this.triggerAction();
el.stopPropagation();
}
});
Post a Comment for "Ember: Prevent Link-to From Firing When An Action Within It Is Clicked"