bug fixing

This commit is contained in:
Maria Teresa Paratore 2024-04-12 11:54:58 +02:00
parent 5dfb5ffa3b
commit 7f1a2e96bd
2 changed files with 11 additions and 6 deletions

View File

@ -43,14 +43,16 @@
</mat-form-field> </mat-form-field>
<!-- PROPERTIES --> <!-- PROPERTIES -->
<!-- myForm.get([facetTemplate.key,ind,'isAdded'])!.value" --> <!--*ngFor="let propCtrl of getPropsGroup(facetTemplate.key,ind).controls|keyvalue; let k=index;"-->
<div formGroupName ="props" > <div formGroupName ="props" >
<div *ngFor="let prop of facetTemplate.value.guiProps">
<mat-form-field> <mat-form-field>
<mat-label>{{facetTemplate.value.guiProps[ind].name}}</mat-label> <mat-label>{{prop.label}}</mat-label>
<input matInput formControlName="{{facetTemplate.value.guiProps[ind].name}}" id="{{facetTemplate.value.guiProps[ind].name}}" <input matInput formControlName="{{prop.name}}" id="{{prop.name}}"
type="{{facetTemplate.value.guiProps[ind].type}}"/> type="{{prop.type}}"/>
</mat-form-field> </mat-form-field>
</div> </div>
</div>
<!-- <!--
<div *ngFor="let prop of facetTemplate.value.guiProps"> <div *ngFor="let prop of facetTemplate.value.guiProps">
<mat-form-field> <mat-form-field>

View File

@ -133,15 +133,18 @@ export class FacetComposerComponent implements OnInit {
}) })
} }
/*
getPropsGroup(denoFacet:string):FormGroup{ getPropsGroup(denoFacet:string):FormGroup{
console.debug("òòòòòòòòòòòòòòò"); console.debug("òòòòòòòòòòòòòòò");
//console.debug((this.getSingleFacetArray(denoFacet)).controls); //console.debug((this.getSingleFacetArray(denoFacet)).controls);
return this.myForm.get(denoFacet)!.get('props') as FormGroup; return this.myForm.get(denoFacet)!.get('props') as FormGroup;
} }
*/
getPropsGroup(denoFacet:string, index:number):FormGroup{
return (this.getSingleFacetArray(denoFacet).controls[index]).get('props') as FormGroup;
}
getExtraPropsArray(denoFacet:string, index:number):FormArray{ getExtraPropsArray(denoFacet:string, index:number):FormArray{
return (this.getSingleFacetArray(denoFacet).controls[index]).get('extraProps') as FormArray; return (this.getSingleFacetArray(denoFacet).controls[index]).get('extraProps') as FormArray;
} }