Reducing Payload Size
Controlling Data Sent from the Browser
Model Override Method
ModelFilterKeys Method
Example runUtilityHook Actions
// With data model containing the following
{
"isLoading": true,
"activeContact": {
//... some single contact object
},
"allContacts" ; [
{
//... array of contact objects
}]
}
// This example will send the entire data model in the hook
{
"action": "runUtilityHook",
"options": {
"type": "save"
}
}
// this will send only the model.activeContact object using the `modelFilterKeys` method
{
"action": "runUtilityHook",
"options": {
"modelFilterKeys": [ "activeContact" ], // you can have multiple filterd keys
"type": "save"
}
}
// this will send only the model.activeContact object using the `model` method
{
"action": "runUtilityHook",
"options": {
"model_calc" : "{activeContact: model.activeContact}",
"type": "save"
}
}Last updated
Was this helpful?