@tetacom/ng-components 1.6.28 → 1.6.29
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.
|
@@ -4092,18 +4092,9 @@ class OnlyNumberDirective {
|
|
|
4092
4092
|
onBlur(e) {
|
|
4093
4093
|
e.preventDefault();
|
|
4094
4094
|
e.stopPropagation();
|
|
4095
|
-
|
|
4096
|
-
if (value
|
|
4097
|
-
value =
|
|
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;
|
|
4095
|
+
const value = this._elementRef.nativeElement.value;
|
|
4096
|
+
if (value.endsWith('.')) {
|
|
4097
|
+
this._elementRef.nativeElement.value = value.replace('.', '');
|
|
4107
4098
|
this._elementRef.nativeElement.dispatchEvent(new Event('input'));
|
|
4108
4099
|
}
|
|
4109
4100
|
}
|