chrv-components 1.10.31 → 1.10.32
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.
|
Binary file
|
|
@@ -905,7 +905,10 @@ class ChrBaseInputComponent {
|
|
|
905
905
|
skip(1), debounceTime(this.debounceTime ?? 200), distinctUntilChanged())
|
|
906
906
|
.subscribe((res) => {
|
|
907
907
|
// If the value is an empty string, set the value to null to trigger validation and prevent an inconsitent value to be set (ex: for number type input)
|
|
908
|
-
|
|
908
|
+
let value = res !== '' ? res : null;
|
|
909
|
+
// If we use the input type numbe, we cast the value to a number because for some reason, it may sometimes be a string.
|
|
910
|
+
if (this.type === 'number')
|
|
911
|
+
value = Number(value);
|
|
909
912
|
this.onChange(value);
|
|
910
913
|
this.valueChanges.emit(value);
|
|
911
914
|
});
|