sf-crud 13.2.29 → 13.2.30
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.
- package/fesm2022/sf-crud.mjs +29 -0
- package/fesm2022/sf-crud.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/sf-crud.mjs
CHANGED
|
@@ -2055,6 +2055,21 @@ class ControlComponent {
|
|
|
2055
2055
|
this.notificationService = notificationService;
|
|
2056
2056
|
}
|
|
2057
2057
|
ngOnChanges(changes) {
|
|
2058
|
+
if (!changes)
|
|
2059
|
+
return;
|
|
2060
|
+
// Sincroniza el autocomplete cuando el value llega actualizado desde el padre
|
|
2061
|
+
if ((this.control?.subtype === 'autocomplete' ||
|
|
2062
|
+
this.control?.subtype === 'autocompleteCustom') &&
|
|
2063
|
+
changes['value'] &&
|
|
2064
|
+
!changes['value'].firstChange) {
|
|
2065
|
+
if (this.value === null || this.value === undefined || this.value === '') {
|
|
2066
|
+
this.tempValue = null;
|
|
2067
|
+
}
|
|
2068
|
+
else {
|
|
2069
|
+
this.extracValueFromControlBusqueda();
|
|
2070
|
+
}
|
|
2071
|
+
this.cdr.detectChanges();
|
|
2072
|
+
}
|
|
2058
2073
|
}
|
|
2059
2074
|
ngOnInit() {
|
|
2060
2075
|
if (this.environment)
|
|
@@ -2096,6 +2111,20 @@ class ControlComponent {
|
|
|
2096
2111
|
this.loadDefaultValues();
|
|
2097
2112
|
//this.cdr.detectChanges()
|
|
2098
2113
|
}
|
|
2114
|
+
else if ((this.control?.subtype === 'autocomplete' ||
|
|
2115
|
+
this.control?.subtype === 'autocompleteCustom') &&
|
|
2116
|
+
res.scope === '$' &&
|
|
2117
|
+
res.value === '$') {
|
|
2118
|
+
if (this.value === null ||
|
|
2119
|
+
this.value === undefined ||
|
|
2120
|
+
this.value === '') {
|
|
2121
|
+
this.tempValue = null;
|
|
2122
|
+
}
|
|
2123
|
+
else {
|
|
2124
|
+
this.extracValueFromControlBusqueda();
|
|
2125
|
+
}
|
|
2126
|
+
this.cdr.detectChanges();
|
|
2127
|
+
}
|
|
2099
2128
|
}
|
|
2100
2129
|
});
|
|
2101
2130
|
}
|