mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 21:00:39 +08:00
Fix #478 - Rename 'onValueChange' to 'onAnyLogic'
- update default to `onDependencyChange`
This commit is contained in:
parent
1ebf1390cd
commit
3adb99624d
9 changed files with 18 additions and 6 deletions
|
@ -174,7 +174,7 @@ export class BaseFieldComponent implements FieldComponentInterface, OnInit, OnDe
|
|||
return;
|
||||
}
|
||||
|
||||
this.logic.runLogic(attribute, this.mode as ViewMode, this.record, 'onValueChange');
|
||||
this.logic.runLogic(attribute, this.mode as ViewMode, this.record, 'onDependencyChange');
|
||||
});
|
||||
|
||||
}));
|
||||
|
|
|
@ -160,7 +160,7 @@ export class DisplayTypeBackendAction extends FieldLogicActionHandler {
|
|||
}
|
||||
|
||||
getTriggeringStatus(): string[] {
|
||||
return ['onValueChange', 'onFieldInitialize'];
|
||||
return ['onAnyLogic', 'onFieldInitialize'];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -232,6 +232,6 @@ export class FieldLogicDisplayTypeAction extends FieldLogicActionHandler {
|
|||
}
|
||||
|
||||
getTriggeringStatus() : string[] {
|
||||
return ['onValueChange', 'onFieldInitialize'];
|
||||
return ['onAnyLogic', 'onFieldInitialize'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,6 @@ export abstract class FieldLogicActionHandler extends ActionHandler<FieldLogicAc
|
|||
};
|
||||
|
||||
getTriggeringStatus() : string[] {
|
||||
return ['onValueChange'];
|
||||
return ['onDependencyChange'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ export class FieldLogicManager extends BaseActionManager<FieldLogicActionData> {
|
|||
}
|
||||
|
||||
const actions = [];
|
||||
const defaultTriggeringStatus = ['onValueChange'];
|
||||
const defaultTriggeringStatus = ['onDependencyChange'];
|
||||
|
||||
availableActions[mode].forEach(action => {
|
||||
|
||||
|
|
|
@ -91,6 +91,6 @@ export class RequiredAction extends FieldLogicActionHandler {
|
|||
}
|
||||
|
||||
getTriggeringStatus(): string[] {
|
||||
return ['onValueChange', 'onFieldInitialize'];
|
||||
return ['onAnyLogic', 'onFieldInitialize'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,4 +73,8 @@ export class UpdateFlexRelateModuleAction extends FieldLogicActionHandler {
|
|||
// re-validate the parent form-control after value update
|
||||
record.formGroup.updateValueAndValidity({onlySelf: true, emitEvent: true});
|
||||
}
|
||||
|
||||
getTriggeringStatus(): string[] {
|
||||
return ['onDependencyChange'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,6 +123,10 @@ export class UpdateValueBackendAction extends FieldLogicActionHandler {
|
|||
}
|
||||
}
|
||||
|
||||
getTriggeringStatus(): string[] {
|
||||
return ['onDependencyChange'];
|
||||
}
|
||||
|
||||
getBaseRecord(record: Record): Record {
|
||||
if (!record) {
|
||||
return null;
|
||||
|
|
|
@ -90,6 +90,10 @@ export class UpdateValueAction extends FieldLogicActionHandler {
|
|||
|
||||
}
|
||||
|
||||
getTriggeringStatus(): string[] {
|
||||
return ['onDependencyChange'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the new value
|
||||
* @param {object} field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue