in src/services/form-validation/FormValidationService.ts [61:81]
setDataValue(this: any, value: never, key: string, data: never) {
if (!unsetsEnabled) {
return value;
}
// Check if this component is not persistent.
if (
Object.prototype.hasOwnProperty.call(this.component, 'persistent') &&
(!this.component.persistent || this.component.persistent === 'client-only')
) {
unsets.push({ key, data });
// Check if this component is conditionally hidden and does not set clearOnHide to false.
} else if (
(!Object.prototype.hasOwnProperty.call(this.component, 'clearOnHide') || this.component.clearOnHide) &&
(!this.conditionallyVisible() || !this.parentVisible)
) {
// unsets.push({ key, data });
} else if (this.component.type === 'password' && value === this.defaultValue) {
unsets.push({ key, data });
}
return value;
},