@tetacom/ng-components 1.6.27 → 1.6.28
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.
|
@@ -4088,14 +4088,22 @@ class OnlyNumberDirective {
|
|
|
4088
4088
|
}
|
|
4089
4089
|
e.preventDefault();
|
|
4090
4090
|
e.stopPropagation();
|
|
4091
|
-
// this.validateValue(this._elementRef.nativeElement.value);
|
|
4092
4091
|
}
|
|
4093
4092
|
onBlur(e) {
|
|
4094
4093
|
e.preventDefault();
|
|
4095
4094
|
e.stopPropagation();
|
|
4096
|
-
|
|
4097
|
-
if (value
|
|
4098
|
-
|
|
4095
|
+
let value = this._elementRef.nativeElement.value;
|
|
4096
|
+
if (value === '') {
|
|
4097
|
+
value = null;
|
|
4098
|
+
this._elementRef.nativeElement.value = value;
|
|
4099
|
+
this._elementRef.nativeElement.dispatchEvent(new Event('input'));
|
|
4100
|
+
}
|
|
4101
|
+
else if (value.endsWith('.')) {
|
|
4102
|
+
value = value.replace('.', '');
|
|
4103
|
+
if (value === '') {
|
|
4104
|
+
value = null;
|
|
4105
|
+
}
|
|
4106
|
+
this._elementRef.nativeElement.value = value;
|
|
4099
4107
|
this._elementRef.nativeElement.dispatchEvent(new Event('input'));
|
|
4100
4108
|
}
|
|
4101
4109
|
}
|