-
Notifications
You must be signed in to change notification settings - Fork 0
Component Action engine
Vadym edited this page Aug 13, 2021
·
7 revisions
Components also should allow describing handlers to control events, e.g. click on button or change on the input field. Actions should be described inside the "action" property at the root of component declaration:
-
name
- action name to be executed when field action occurs -
confirmation
- confirmation message to be shown before action executing. User should allow or decline to execute -
dynamic
- dynamic configuration to change element properties, including automatic action execution by condition (usedaction.execute
property in dynamic).
{
name: 'saveButton',
ui: {label: 'Save form'},
action: {name: 'save'}
}
{
name: 'saveButton',
ui: {label: 'Save form'},
action: {name: 'save'},
dynamic: {
prop: 'action.execute', // reserved property name to describe automatic action execution
val: true // boolean indicator to trigger action or not
when: [{
binding: 'someBinding',
fn: 'comparator',
val: 'valueToCompare'
}]
}
}