Skip to content

Instantly share code, notes, and snippets.

@srsgores
Created November 26, 2014 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srsgores/2c149367ba5a3a1f3202 to your computer and use it in GitHub Desktop.
Save srsgores/2c149367ba5a3a1f3202 to your computer and use it in GitHub Desktop.
mixin used for checkboxable array
CheckboxableArrayMixin = Ember.Mixin.create
allSelected: false
selectedItems: Ember.computed.filterBy("", "selected", true)
selectedItemsCount: Ember.computed.alias("selectedItems.length")
isEmpty: Ember.computed.not(@get("model"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment