@tetacom/ng-components 1.0.124 → 1.0.125
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/esm2020/component/table/default/numeric-cell/numeric-cell.component.mjs +1 -1
- package/esm2020/directive/only-number/only-number.directive.mjs +7 -3
- package/fesm2015/tetacom-ng-components.mjs +6 -2
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +6 -2
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2811,8 +2811,12 @@ class OnlyNumberDirective {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
else {
|
|
2813
2813
|
if (e.key === ',' && originalValue.indexOf('.') < 0) {
|
|
2814
|
-
this._elementRef.nativeElement.value =
|
|
2815
|
-
|
|
2814
|
+
// this._elementRef.nativeElement.value =
|
|
2815
|
+
// `${originalValue.slice(0, cursorPosition)}.${originalValue.slice(cursorPosition)}`;
|
|
2816
|
+
this._control.control.patchValue(`${originalValue.slice(0, cursorPosition)}.${originalValue.slice(cursorPosition)}`);
|
|
2817
|
+
if (this._elementRef.nativeElement.setSelectionRange) {
|
|
2818
|
+
this._elementRef.nativeElement.setSelectionRange(cursorPosition + 1, cursorPosition + 1);
|
|
2819
|
+
}
|
|
2816
2820
|
}
|
|
2817
2821
|
e.preventDefault();
|
|
2818
2822
|
}
|