debugging on Select...
This commit is contained in:
parent
d84328823b
commit
172d53b28c
|
@ -78,15 +78,16 @@
|
|||
<div style="padding-top: 24px; padding-bottom: 24px;">
|
||||
<mat-form-field appearance="outline" [style.width.px]="250">
|
||||
<mat-label for="selFacet" >Available Facet Types</mat-label>
|
||||
<!--<select #teams (change)="onSelected(teams.value)">-->
|
||||
<mat-select #selFacet (change)="onSelectNewFacet(selFacet.value)">
|
||||
<!--<select #teams (change)="onSelected(teams.value)">
|
||||
(change)='onOptionsSelected(mySelect.value)'-->
|
||||
<mat-select #selFacet (change)="onOptionsSelected(selFacet.value)">
|
||||
<mat-option *ngFor="let item of addableFacets" [value]="item">
|
||||
{{item}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button mat-icon-button color="primary" matTooltip="add new facet"
|
||||
matTooltipClass="tableTooltip" [matTooltipPosition]="'right'" (click)="addFacet(selectedFacet)">
|
||||
matTooltipClass="tableTooltip" [matTooltipPosition]="'right'" (click)="addFacet(selectedOption)">
|
||||
<mat-icon>add</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -33,6 +33,7 @@ export class FacetComposerComponent implements OnInit {
|
|||
|
||||
titleType: string;
|
||||
titlePath: string;
|
||||
selectedOption: string;
|
||||
|
||||
myForm: FormGroup; //form complessiva
|
||||
|
||||
|
@ -73,6 +74,7 @@ export class FacetComposerComponent implements OnInit {
|
|||
@Inject(MAT_DIALOG_DATA) data: {type: IResource ,context:IContextNode}){
|
||||
this.titleType = data.type.name;
|
||||
this.titlePath = data.context.path;
|
||||
this.selectedOption = '';
|
||||
// this.facetData = [];
|
||||
this.typeSpec = {} as ITypeSpecification;
|
||||
this.fieldsMap = new Map<string,IFacetComposer>();
|
||||
|
@ -130,10 +132,10 @@ export class FacetComposerComponent implements OnInit {
|
|||
return res;
|
||||
}
|
||||
|
||||
selectedFacet = '';
|
||||
onSelectNewFacet(value:string): void {
|
||||
this.selectedFacet = value;
|
||||
alert('Cosa?...'+this.selectedFacet);
|
||||
|
||||
onOptionsSelected(value:string): void {
|
||||
this.selectedOption = value;
|
||||
console.debug('******onOptionsSelected?...'+value);
|
||||
}
|
||||
|
||||
//TODO: NOTA BENE--> FormGroup->access by NAME, FormArray->access by INDEX!!
|
||||
|
@ -247,6 +249,7 @@ export class FacetComposerComponent implements OnInit {
|
|||
|
||||
//TODO: ADD DEFAULT FACET (usa json: defaultFacet)
|
||||
addFacet(nameplus:string): void {
|
||||
alert(nameplus)
|
||||
// this.facetArray.push(this.addFacetGroup());
|
||||
//this.createFacetGroup(this.facetData[ind]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue