-
Notifications
You must be signed in to change notification settings - Fork 6
deleteValue
"deleteValue" can be defined in manifest under the "_q" property of any node. That defines the value of actual node on delete command. "deleteValue" will be triggered, if data is sent or if "set" option is defined (as "true") while "flatte.do" function called. Otherwise it will never work.
{
node: {
_q:{
// Simple
deleteValue: null
}
}
}Available Options: "$" (Means Income Data) / ".doNothing" / JS variable types / predefined templates.
{
tests: {
childs: {
testID: {
_q: {
ID: true
},
childs: {
id: {
_q: {
// ID of self node or parent nodes.
// This line is for demonstration. If "#testID/id" field is not sent, saveValue will not be triggered.
deleteValue: "#testID"
},
}
firstName: {
_q: {
// Income data
deleteValue: "$"
// Whatever data is sent, flatte will not do anything about that field. Discards sent data.
deleteValue: ".doNothing"
// Discard incoming data and set as defined
deleteValue: null / true / false / "a string" / {"an":"object"} / ["an","array"]
// Predefined
deleteValue: ".timestamp" / ".myFunction('213')"
},
}
}
}
}
}
}!Important: Predefined function is not supported to recieve incoming data for now. You can pass constants as written in brackets
We recommend you to think various complex scenarios and make some tests. Flatte Manifest Builder will help you to create a manifest and you can run your tests, easily
- Flatte is licensed under the MIT License - see the LICENSE.md file for details
Getting Started
Flatte Manifest
Predefined Templates
Usage
Flatte Manifest Builder