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

Inputs have no support for Ember Field's events

Open lgraziani2712 opened this issue 10 years ago • 3 comments

A traditional {{input}} can be binded with events as focus-in or focus-out easily because includes in the component extension called TextSupport. When I tried to do the same with your {{md-input}}, nothing happened. I slightly changed your md-input-field.js to include this functionality:

import Ember from 'ember';
const { Component, computed, isPresent, TextSupport } = Ember;
export default Component.extend(TextSupport, {
    *everything is the same*
}

With that simple modification, when you do a {{md-input focus-in="someAction" }}, someAction will be triggered.

lgraziani2712 avatar Oct 09 '15 13:10 lgraziani2712

Well, that didn't turned well. When I try to fill any input, it doesn't add the word into the field ;(

Anyone know if is there a different way to include that kind of events?

lgraziani2712 avatar Oct 09 '15 14:10 lgraziani2712

:+1: would be helpful to get this by default.

richmolj avatar Mar 04 '16 15:03 richmolj

Too much in v0 of this addon deviates from standard HTML input behavior. v1 ( #292 ) will make this possible and easy :)

mike-north avatar Mar 16 '16 03:03 mike-north