UNPKG

@pega/dx-component-builder-sdk

Version:

Utility for building custom UI components

26 lines (25 loc) 935 B
<div *ngIf="displayMode$; else noDisplayMode"> <component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper> </div> <ng-template #noDisplayMode> <div *ngIf="bVisible$ && bHasForm$"> <div [formGroup]="formGroup$"> <mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText"> <mat-label>{{ label$ }}</mat-label> <input matInput [placeholder]="placeholder" type="text" [value]="value$" [required]="bRequired$" [readonly]="bReadonly$" [attr.data-test-id]="testId" [formControl]="fieldControl" (change)="fieldOnChange($event)" (blur)="fieldOnBlur($event)" /> <mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error> </mat-form-field> </div> </div> </ng-template>