Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling action in Ember Input Helper

I have this input field

   {{input {{action 'test2' on="keyDown" allowedKeys="any"}} }}

I am not able to this action. Is there a way to call an action when we have something like this?

like image 681
mohsinali1317 Avatar asked Nov 01 '25 20:11

mohsinali1317


1 Answers

No, It is not possible to do it like this. As you are trying to bind "keyDown" event. Can't you achieve the same functionality by observing text box value. I have given the sample code here.

Template :

{{input value=myValue}}

Controller :

myValueDidChange : function() {
    // Code here
}.observes('myValue')
like image 126
M.G.Manikandan Avatar answered Nov 04 '25 03:11

M.G.Manikandan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!