[Library | Trunk]: Add warning on input

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59810 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-11-11 09:19:12 +00:00
parent 38d900b960
commit 72cd3c9c43
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ export interface Option {
</div>
</ng-template>
<span *ngIf="formControl.errors && formControl.errors.error" class="uk-text-small uk-text-danger">{{formControl.errors.error}}</span>
<span *ngIf="warning" class="uk-text-small uk-text-warning">{{warning}}</span>
</div>
</div>
<mat-checkbox *ngIf="type === 'checkbox'" [formControl]="formControl">{{label}}</mat-checkbox>
@ -68,6 +69,7 @@ export class InputComponent implements OnInit, OnDestroy, OnChanges {
@Input() hideControl: boolean = false;
@Input() icon: string = null;
@Input() iconLeft: boolean = false;
@Input() warning: string = null;
public required: boolean = false;
private initValue: any;
private subscriptions: any[] = [];