ember-cli-materialize
ember-cli-materialize copied to clipboard
How to add action on enter for md-input?
How do I add an action for key-press (e. g. enter) on md-input component?
You can catch an enter key-press in a component using:
keyPress: function(e) {
if(e.which === 13) {
//Do Something here...
}
},
You will probably need to extend the input component.
Hope that helps.
Thanks, that works for me. But shouldn't there be a more semantic way like a parameter for the md-input-component?