Ben bir giriş odaklanmış aldığında şu anda benim şablonu bu kullanıyorum ..
bir eylem tetiklemek için nasıl bilmek istiyorum:Bir giriş netlendiğinde bir eylem nasıl tetiklenir?
export default Ember.TextField.extend({
onEvent: 'focusIn',
focusIn: function() {
this.sendAction('focusIn', this, event);
}
});
ve bu tarih: {{view "clickinput" class="form-control" placeholder="search..." value=s action="focus"}}
ve görünüm olarak bu benim denetleyicisi: Ben chrome bu hatayı alıyorum
actions: {
focus: function() {
alert('f');
}
}
ama çalışmıyor ..: Uncaught Error: Assertion Failed: The focusIn action was triggered on the component <[email protected]:clickinput::ember438>, but the action name (function superWrapper() { var ret, sup = this.__nextSuper; this.__nextSuper = superFunc; ret = func.apply(this, arguments); this.__nextSuper = sup; return ret; }) was not a string.
neden? Düşündüğümden daha