fix issue where hints wouldn't show for non-repeatable fields, and remove commented out bits of code

This commit is contained in:
Art Lowel
2020-06-29 15:34:18 +02:00
parent a49607ed61
commit 775becd656
4 changed files with 2 additions and 5 deletions

View File

@@ -11,7 +11,7 @@
'd-none': value?.isVirtual && (model.hasSelectableMetadata || context?.index > 0)}">
<div [ngClass]="getClass('grid', 'control')">
<ng-container #componentViewContainer></ng-container>
<small *ngIf="hasHint && context?.index === 0 && (!showErrorMessages || errorMessages.length === 0)"
<small *ngIf="hasHint && (model.repeatable === false || context?.index === 0) && (!showErrorMessages || errorMessages.length === 0)"
class="text-muted" [innerHTML]="model.hint | translate" [ngClass]="getClass('element', 'hint')"></small>
<div *ngIf="showErrorMessages" [ngClass]="[getClass('element', 'errors'), getClass('grid', 'errors')]">

View File

@@ -17,6 +17,7 @@ export class DynamicDsDatePickerModel extends DynamicDateControlModel {
valueUpdates: Subject<any>;
malformedDate: boolean;
hasLanguages = false;
repeatable = false;
constructor(config: DynamicDateControlModelConfig, layout?: DynamicFormControlLayout) {
super(config, layout);