mardi 1 mai 2018

Detecting change in a textbox without off-click with Ember

I have an Ember.js app that includes a form which can't be submitted until both of two input fields are filled in. The current code includes this as part of a mixin:

disableSubmit: (function() {
  return (this.get('field1.amout') == null) || (this.get('field2.amount') == null);
}).property('field1', 'field2'),

This almost behaves the way I want, except the submit button doesn't become enabled until the user clicks off the second input. How do I get the property to update without the user needing to click off?




Aucun commentaire:

Enregistrer un commentaire