Skip to content
Snippets Groups Projects
Commit 5bac08d5 authored by mathias.chouet's avatar mathias.chouet
Browse files

Fix #368

parent c4902c50
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
<input matInput #inputControl="ngModel" class="form-control" type="text" inputmode="numeric"
[id]="inputId" [name]="inputId" [disabled]="isDisabled" [(ngModel)]="uiValue" [placeholder]="title"
(keydown.Tab)="onTabPressed($event, false)" (keydown.shift.Tab)="onTabPressed($event, true)"
pattern="^-?([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$" required>
pattern="^-?([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$" [required]="isRequired">
<div *ngIf="enableHelpButton" class="overlap-input">
<mat-icon id="help-input" (click)="openHelp($event)" [title]="uitextOpenHelp" color="accent">
......
......@@ -203,6 +203,10 @@ export abstract class GenericInputComponentDirective implements OnChanges {
return this._model;
}
public get isRequired(): boolean {
return ! this.model.allowEmpty;
}
/**
* événement de changement de la valeur du modèle
*/
......
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