cloud-ide-element 1.1.36 → 1.1.37
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.
|
@@ -635,14 +635,15 @@ class CideInputComponent {
|
|
|
635
635
|
}
|
|
636
636
|
/** @description when form control change from model side this method is implemented */
|
|
637
637
|
writeValue(value) {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
638
|
+
// writeValue is called by Angular's ControlValueAccessor for reactive forms (formControlName)
|
|
639
|
+
// Always allow writeValue to update the value when called
|
|
640
|
+
// The isNgModel check was preventing reactive forms from working
|
|
641
|
+
let ngModel = this.autoCapitalizeByOption(value, this.type);
|
|
642
|
+
if (this.type === 'date') {
|
|
643
|
+
ngModel = this.processValue(ngModel, this.type);
|
|
644
|
+
}
|
|
645
|
+
console.log('writeValue', this.ngModel, ngModel);
|
|
646
|
+
this.ngModel = ngModel;
|
|
646
647
|
}
|
|
647
648
|
/** @description Allows Angular to register a function to call when the model changes. */
|
|
648
649
|
// Save the function as a property to call later here.
|