Skip to content
Snippets Groups Projects
Commit 09d0c04e authored by François Grand's avatar François Grand
Browse files

fix: change input value pattern

refs #628
parent e8ec200f
No related branches found
No related tags found
1 merge request!229Resolve "Le séparateur décimal est passé à la virgule sur certaines configurations"
Pipeline #143266 passed
......@@ -89,7 +89,7 @@
<input matInput *ngIf="isNumberInput(cell)" type="text" required
[ngModel]="getCellValue(cell)" (ngModelChange)="setCellValue(cell,$event)"
(input)="inputValueChanged($event, cell)" (keypress) ="invalidNANInputValue($event)"
pattern="^-?([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$" inputmode="numeric"
pattern="^-?[0-9]*\.?[0-9]*$" inputmode="numeric"
>
<mat-select #selectWidget *ngIf="isSelect(cell)" [value]="cell.modelValue"
......
......@@ -1389,9 +1389,6 @@ export class PabTableComponent implements AfterViewInit, AfterViewChecked, OnIni
}
public setCellValue(cell, $event) {
if (/^-?[0-9]*\.?[0-9]*$/g.test($event) === false) {
$event = $event.replace(/[^0-9\-.]/g, '');
}
if($event !== "-" && $event !== "") {
try {
cell.model.singleValue = $event;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment