ember-cli-materialize icon indicating copy to clipboard operation
ember-cli-materialize copied to clipboard

[v1] md-input oninput action

Open dustinfarris opened this issue 9 years ago • 5 comments

Need to be able to receive oninput action.

Something like

{{md-input on-input=(action (mut myValue))}}

This should be easy to implement in the md-input template. Just needs a handler in the md-input component and a test.

dustinfarris avatar Jul 28 '16 19:07 dustinfarris

This is an issue for my company too, when changing from normal ember {{input}} it can cause issues to no longer be able to use DDAU. Especially for us where we are doing some dynamic form creation so to just create Ember.observer()s on the value fields would get complicated very quickly.

DanLatimer avatar Aug 11 '16 18:08 DanLatimer

This would be pretty easy for anyone to add, just following the same model as the other actions on-change, on-click, etc... PRs are always welcome :)

mike-north avatar Aug 12 '16 02:08 mike-north

Could you point me to where in the code you're using on-change and on-click. I don't see it.

DanLatimer avatar Aug 12 '16 13:08 DanLatimer

How is this different than the on-change action that is currently being sent?

eshtadc avatar Jun 16 '17 17:06 eshtadc

I've sent a PR with some improvements, now the component md-input can respond to some actions that has the basic Ember input:

  • key-press
  • key-up
  • enter

Please, take a look to the code if you could. I think you can now do something like this: {{md-input onKeyPress=(action (mut value))}} but I haven't tried it.

Gorzas avatar Aug 18 '17 09:08 Gorzas