FilteredCollection
Summary
A FilteredCollection acts as a subset of some 'source' collection. It is bound to the models in it's source collection, though only models which pass a defined filter will be set on the FilteredCollection.
Constructor
Item Index
Methods
Properties
Events
Methods
_prepareModel
Syntax
_prepareModel
()
private
Summary
Pass modelOptions on to newly created models.
add
Syntax
add
-
models
Summary
Add models to the collection.
Parameters:
-
models
Array.<Backbone.Model|Object>
bindToSourceCollection_
Syntax
bindToSourceCollection_
()
private
Summary
ensureSourceCollection_
Syntax
ensureSourceCollection_
()
private
Summary
isValid
Syntax
Summary
Runs validation on all collection models.
Returns:
Returns false if any model fails validation.
parse
Syntax
parse
()
protected
Summary
pop
Syntax
pop
()
protected
Summary
push
Syntax
push
()
protected
Summary
remove
Syntax
remove
-
models
Summary
Remove models from the collection.
Parameters:
-
models
Array.<Backbone.Model>
reset
Syntax
reset
-
opt_models
Summary
Remove and replace all models in the collection.
Parameters:
-
opt_models
Array.<Backbone.Model|Object>=
set
Syntax
set
()
protected
Summary
setFilter
Syntax
setFilter
-
filter
-
opt_ctx
Summary
Filters the collection, using models from the source collection.
Filter will continue to be used when keeping the FilteredCollection in sync with its source collection.
shift
Syntax
shift
()
protected
Summary
slice
Syntax
slice
()
protected
Summary
updateModelsFromSource_
Syntax
updateModelsFromSource_
()
private
Summary
Properties
length
Syntax
length
Unknown
Summary
The number of models in the collection.
modelOptions_
Syntax
Summary
Options to pass on to models created by this collection.
Events
add
Syntax
add
Summary
When a model is added to the {aeris.Collection}.
Event Payload:
-
model
aeris.Model -
collection
aeris.Collection
change
Syntax
change
Summary
When any child model's attribute changes
Event Payload:
-
model
aeris.Model
change:[attribute]
Syntax
change:[attribute]
Summary
When any child model's attribute changes, where [attribute] is the name of the attribute.
Event Payload:
-
model
aeris.Model -
value
remove
Syntax
remove
Summary
When a model is removed from the {aeris.Collection}.
Event Payload:
-
model
aeris.Model -
collection
aeris.Collection