English
form.dataChange.after
About 177 wordsLess than 1 minute
2025-12-15
This hook is triggered after the main object field value changes on the form and before UI events/calculations are executed. It allows extra business actions after editing main-object fields, including but not limited to the following capabilities:
Using this hook for data updates is not recommended. Prefer the form.change.end hook instead.
- Listen for main object field value changes
- Modify main object data
Parameters
| Parameter | Description | Type |
|---|---|---|
| Common parameters | See details | -- |
| changeData | New data after the change | Object |
| oldData | Previous data before the change | Object |
Return Value
None
Basic Example
Change other field values after the main field value changes
export default class Plugin {
apply() {
return [{
event: 'form.dataChange.after',
functional: this.formDataChange.bind(this)
}]
}
formDataChange(context, plugin) {
if(context.changeData.name) { // detect that the main property field has changed
context.dataUpdater.updateMaster({
owner: ['1000']
});
}
}
}Notes
1. Field values changed in this hook will also participate in subsequent calculation/UI-event logic
After data is modified in this hook, subsequent calculations and UI events will be processed based on the updated values.
