From f9c247e02c7a6e9efdb5abd5975754f3b337ada4 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Tue, 14 May 2019 17:33:04 +0200 Subject: [PATCH] Fix #199 : ID uniques pour les <input> des PabCloisons --- src/app/components/generic-input/generic-input.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/generic-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts index e75f2ed18..4b23185d6 100644 --- a/src/app/components/generic-input/generic-input.component.ts +++ b/src/app/components/generic-input/generic-input.component.ts @@ -1,7 +1,7 @@ import { Input, Output, EventEmitter, ChangeDetectorRef, OnChanges, ViewChild } from "@angular/core"; import { NgModel } from "@angular/forms"; import { BaseComponent } from "../base/base.component"; -import { isNumeric, Structure } from "jalhyd"; +import { isNumeric, Structure, PabCloisons } from "jalhyd"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; import { NgParameter } from "../../formulaire/ngparam"; import { I18nService } from "../../services/internationalisation/internationalisation.service"; @@ -46,7 +46,7 @@ export abstract class GenericInputComponent extends BaseComponent implements OnC // if inside a nested Structure, prefix with Structure position // to disambiguate const nub = param.paramDefinition.parentNub; - if (nub && nub instanceof Structure) { + if (nub && (nub instanceof Structure || nub instanceof PabCloisons)) { id = nub.findPositionInParent() + "_" + id; } } -- GitLab