We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All my computed properties that interact with relationships are broken in ember-2.1 - 2.2 with ember-data 2.0 - 2.2
For example:
//models/invoice.js export default DS.Model({ lines: DS.hasMany('invoice-line') }); //models/invoice-line.js export default DS.Model({ amount: DS.attr('number') }); //components/invoice.js export default Ember.Component({ total: computed('invoice.lines.@each.amount', function() { this.get('invoice.lines').reduce((value, item) => { return value += item.get('amount'); }, 0); }), });
That computed property total should work but does not. The workaround is to expose the content property of the invoice.lines relationship.
total
invoice.lines
ie: 'invoice.lines.@each.amount' to 'invoice.lines.content.@each.amount'
I however do not want to do that as this is "obviously?" a bug.
I am unsure if this is a bug with ember-data's RecordArray Promise implementation or ember's bug observing arrays.
The text was updated successfully, but these errors were encountered:
related? emberjs/ember.js#12475
Sorry, something went wrong.
@jcope2013 I believe this is, at least partially, the source of at least some of the issues reported on emberjs/ember.js#12475
Fixed in ember 2.2.3 by emberjs/ember.js#12908
No branches or pull requests
All my computed properties that interact with relationships are broken in ember-2.1 - 2.2 with ember-data 2.0 - 2.2
For example:
That computed property
total
should work but does not. The workaround is to expose the content property of theinvoice.lines
relationship.ie: 'invoice.lines.@each.amount' to 'invoice.lines.content.@each.amount'
I however do not want to do that as this is "obviously?" a bug.
I am unsure if this is a bug with ember-data's RecordArray Promise implementation or ember's bug observing arrays.
The text was updated successfully, but these errors were encountered: