DataAdapter#watchRecords()

watchRecords (modelName, recordsAdded, recordsUpdated, recordsRemoved) Functionpublic

Defined in packages/ember-extension-support/lib/data_adapter.js:172

Fetch the records of a given type and observe them for changes.

Parameters:

modelName String
The model name.
recordsAdded Function
Callback to call to add records. Takes an array of objects containing wrapped records. The object should have the following properties: columnValues: {Object} The key and value of a table cell. object: {Object} The actual record object.
recordsUpdated Function
Callback to call when a record has changed. Takes an array of objects containing wrapped records.
recordsRemoved Function
Callback to call when a record has removed. Takes the following parameters: index: The array index where the records were removed. count: The number of records removed.

Returns:

Function
Method to call to remove all observers.
doc_EmberJs
2016-11-30 16:49:11
Comments
Leave a Comment

Please login to continue.