Skip to content

Commit

Permalink
Added .not
Browse files Browse the repository at this point in the history
  • Loading branch information
shoxter committed Jul 8, 2016
1 parent a7bb8bd commit f09a160
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions addon/components/paper-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ const { Component, computed, on, observer } = Ember;

export default Component.extend(ParentMixin, {
tagName: '',
isValid: computed.not('[email protected]', function() {
return this.get('childComponents').isAny('isInvalid');
}),
isInvalid: computed.not('isValid', function() {
return this.get('isValid');
isValid: computed('[email protected]', function() {
return !this.get('childComponents').isAny('isInvalid');
}),
isInvalid: computed.not('isValid'),
sendToParent: on('init', observer('isValid', function() {
if (!this.get('parentAction')) {
return;
Expand Down

2 comments on commit f09a160

@DanChadwick
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^Wouldn't this make more sense reversed, so isValid is not isInvalid?

@miguelcobain
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would

Please sign in to comment.