Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use multiple action on input helper #11551

Closed
xfanz opened this issue Jun 25, 2015 · 3 comments
Closed

How to use multiple action on input helper #11551

xfanz opened this issue Jun 25, 2015 · 3 comments

Comments

@xfanz
Copy link

xfanz commented Jun 25, 2015

{{input name="nm action="oknm" on="focus-out" }}
I also want to define an action on "focus-in"
How to do?

@sevansio
Copy link

If you use a native input element rather than the {{input}} HTMLbars helper and you can do the following:
<input name="nm" {{action "focusIn" on="focusIn"}} {{action "focusOut" on="focusOut"}} />

Then you just need to define the action handlers where applicable on your Component, Controller or Route depending on where you've implemented your <input> field :

actions: {
  focusIn: function() {
  },

  focusOut: function() {
  }
}

@trek
Copy link
Member

trek commented Jun 29, 2015

The related PR is #11373. This should be present on 1.13. In the future, StackOverflow is probably a better location for how-to Q/A

@trek trek closed this as completed Jun 29, 2015
@stefanpenner
Copy link
Member

@trek i don't believe that works on the input component

that being said, this is better asked on Stackoverflow as it is a much better venue for Q/A. If a bug does arise feel free to open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants