sapenlinea-components 0.11.90 → 0.11.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3637,23 +3637,20 @@ class FeatureCard {
|
|
|
3637
3637
|
}
|
|
3638
3638
|
}, ...(ngDevMode ? [{ debugName: "formattedDescription" }] : []));
|
|
3639
3639
|
constructor() {
|
|
3640
|
-
// Sincroniza
|
|
3640
|
+
// Sincroniza description solo cuando el feature cambia desde el padre,
|
|
3641
|
+
// pero nunca pisa un valor que el formulario (writeValue) ya haya establecido.
|
|
3641
3642
|
effect(() => {
|
|
3642
3643
|
const feat = this.feature();
|
|
3643
|
-
|
|
3644
|
+
const incoming = feat?.description ?? '';
|
|
3645
|
+
if (incoming !== this.descriptionValue()) {
|
|
3646
|
+
this.descriptionValue.set(incoming);
|
|
3647
|
+
}
|
|
3644
3648
|
});
|
|
3645
3649
|
}
|
|
3646
3650
|
// --- ControlValueAccessor Implementation ---
|
|
3647
3651
|
writeValue(value) {
|
|
3648
3652
|
const nextDescription = value == null ? '' : String(value);
|
|
3649
|
-
// Solo actualizamos el valor visual (descriptionValue)
|
|
3650
3653
|
this.descriptionValue.set(nextDescription);
|
|
3651
|
-
// Mantenemos sincronizado el objeto base
|
|
3652
|
-
const current = this.feature();
|
|
3653
|
-
if (current) {
|
|
3654
|
-
// Modificamos el objeto feature subyacente para no perder la configuración
|
|
3655
|
-
this.feature.set({ ...current, description: nextDescription });
|
|
3656
|
-
}
|
|
3657
3654
|
}
|
|
3658
3655
|
registerOnChange(fn) {
|
|
3659
3656
|
this.onChange = fn;
|