sir-dunxalot / ember-easy-form-extensions

Manages form submission in the controller/component and route layers of Ember apps
MIT License
28 stars 14 forks source link

Calling set on destroyed object #41

Open sir-dunxalot opened 9 years ago

sir-dunxalot commented 9 years ago

Update input group actions to:

actions: {

    showError: function showError() {
      if (!this.get('isDestroying')) {
        this.set('showError', true);
      }
    },

    setGroupAsInvalid: function setGroupAsInvalid() {
      if (!this.get('isDestroying')) {
        this.set('isValid', false);
      }
    },

    setGroupAsValid: function setGroupAsValid() {
      if (!this.get('isDestroying')) {
        this.set('isValid', true);
      }
    }

  },
jme783 commented 8 years ago

+1, implemented this fix on our fork and it worked

sir-dunxalot commented 8 years ago

Awesome, thanks for the update. I will try and release this as a patch soon (and before 1.0.0 of this library is released as stable for Ember 2+).

jme783 commented 8 years ago

Cool thx @sir-dunxalot! FYI @brycekahle and myself have been working on a fork of this library that is compatible with Ember 2.4+. The fork is here --> https://github.com/spark/ember-easy-form-extensions.

We would definitely love to submit some P/Rs if you'd be interested

sir-dunxalot commented 8 years ago

Oh awesome, thanks for the heads. Up 2.0.0 is now released because Ember EasyForm now has a 1.0.0.rc-1 release. The 2.0.0 release gets back to the original purpose of this addon, which is handling submission events (not form components).

If you're looking to keep using the components I'd be open to making additional 1.x releases that also support Ember 2.0+. And any other changes you made that still relate to 2.0 can definitely be merged into master.

Let me know what you think.