Properties:
Name | Type | Description |
---|---|---|
sid |
String | List unique id |
uniqueName |
String | List unique name |
Fires:
Methods
-
get(index)
-
Retrieve item by index
Parameters:
Name Type Description index
Number item index Returns:
- Type
- Promise.<Item>
-
getItems(args)
-
Query items from List
Parameters:
Name Type Description args
Object Arguments for items query Properties
Name Type Description from
String Item, which should be used as an anchor. If undefined, starts from the beginning or end depending on args.order pageSize
Number Results page size order
String Order of results, should be 'asc' or 'desc' Returns:
- Type
- Promise.<Paginator>
-
mutate(Index, Mutator)
-
Updates the existing item value
Parameters:
Name Type Description Index
Number Item key Mutator
List~Mutator Function performing value mutation Returns:
- Type
- Promise
-
push(value)
-
Add element to the List
Parameters:
Name Type Description value
Object value to add Returns:
A new item- Type
- Promise.<Item>
-
remove(index)
-
Remove List item by index
Parameters:
Name Type Description index
Number item index Returns:
Promise to remove, which may fail -
removeList()
-
Remove list from service. It will be impossible to restore it.
Returns:
Promise to delete the collection- Type
- Promise
-
set(index, value)
-
Update existing item in a List
Parameters:
Name Type Description index
Number index in the List value
Object value to set If true, promise will be rejected if value was remotely modified Returns:
- A new element- Type
- Promise.<Item>
-
update(Index, update)
-
Parameters:
Name Type Description Index
Number Item key update
Object Set of fields to update Returns:
Result data- Type
- Promise.<Item>
Type Definitions
-
Mutator(data)
-
Applies a transformation to the item value
Parameters:
Name Type Description data
Object current value of an item Returns:
Modified data for an item- Type
- Object
Events
-
collectionRemoved
-
Fired when List is removed from server
-
collectionRemovedRemotely
-
Fired when List is removed from server by remote actor
-
itemAdded
-
Fired when item is added to the List
Type: Item
-
itemAddedRemotely
-
Fired when item is added to List by remote actor
Type: Item
-
itemRemoved
-
Fired when item is removed from the List
Type: String
-
itemRemovedRemotely
-
Fired when item is removed from the List by remote actor
Type: String
-
itemUpdated
-
Fired when item is updated
Type: Item
-
itemUpdatedRemotely
-
Fired when item is updated by remote actor
Type: Item