meteoJS/base/collection
Source: base/
Child class
Abstract type
Events
Class
Collection
Abstract type
options Object
Options for constructor.
Properties
Name | Type | Optional | Description |
---|---|---|---|
fireReplace |
boolean |
Yes |
Fire |
fireAddRemoveOnReplace |
boolean |
Yes |
Fire |
appendOnReplace |
boolean |
Yes |
Append item to the end, if item is replaced. |
sortFunction |
(undefined or function()) |
Yes |
Sort function to sort the collection list. |
emptyObjectMaker |
(undefined or function()) |
Yes |
Function that returns an empty
|
Events
add:item
Triggered on adding item to collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
item |
|
Added item. |
remove:item
Triggered on removing item from collection.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
item |
|
Removed item. |
replace:item
Triggered on replacing item with already existing ID.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
item |
|
Added item. |
|
removedItem |
|
Replaced and removed item. |