Fix hints not being displayed for dynamic array fields

This commit is contained in:
Alexandre Vryghem
2023-03-03 21:45:37 +01:00
parent e4f483c308
commit 79cb51b2c1
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
<ng-container #componentViewContainer></ng-container>
</div>
<small *ngIf="hasHint && ((!model.repeatable && (isRelationship === false || value?.value === null)) || (model.repeatable === true && context?.index === context?.context?.groups?.length - 1)) && (!showErrorMessages || errorMessages.length === 0)"
<small *ngIf="hasHint && (formBuilderService.hasArrayGroupValue(model) || (!model.repeatable && (isRelationship === false || value?.value === null)) || (model.repeatable === true && context?.index === context?.context?.groups?.length - 1)) && (!showErrorMessages || errorMessages.length === 0)"
class="text-muted ds-hint" [innerHTML]="model.hint | translate" [ngClass]="getClass('element', 'hint')"></small>
<!-- In case of repeatable fields show empty space for all elements except the first -->
<div *ngIf="context?.index !== null

View File

@@ -248,7 +248,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
private submissionObjectService: SubmissionObjectDataService,
private ref: ChangeDetectorRef,
private formService: FormService,
private formBuilderService: FormBuilderService,
public formBuilderService: FormBuilderService,
private submissionService: SubmissionService
) {
super(ref, componentFactoryResolver, layoutService, validationService, dynamicFormComponentService, relationService);