Forked from richmolj/gist:73ab1d8875f978ad4d591d78d074639f
Last active
August 24, 2016 14:17
-
-
Save juggy/d9fd704bfee4cd41b8927b7bff2a8c0e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fieldList = [ | |
{ label: 'Foo Fields', fields: [{name: 'foo', selected: false}] }, | |
{ label: 'Bar Fields', fields: [{name: 'bar', selected: true}] } | |
] | |
fields: Ember.computed('[email protected]', function() { | |
return this.get("fieldList").mapBy("fields"); | |
}), | |
enabledFields: Ember.computed("fields", "[email protected]", function(){ | |
return this.get("fields").filterBy("selected"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment