summaryrefslogtreecommitdiffstats
path: root/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts')
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts
index 1850549aa..5aac51bed 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts
@@ -21,6 +21,7 @@
import { Component, OnInit, ViewChild, EventEmitter, Output } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import { ExsistingModelService } from '../exsisting-model.service';
+import { MatAutocompleteTrigger } from '@angular/material'
@Component({
selector: 'app-search-resource',
@@ -31,8 +32,9 @@ export class SearchResourceComponent implements OnInit {
myControl: FormGroup;
@Output() resourcesData = new EventEmitter();
- options: any[] = [] ;
- // = ['One','One1', 'Two', 'Three'];
+ options: any[] = ['One','One1', 'Two', 'Three'];
+ // @ViewChild('resourceSelect') resourceSelect;
+ @ViewChild('resourceSelect', { read: MatAutocompleteTrigger }) resourceSelect: MatAutocompleteTrigger;
searchText: string = '';
constructor(private _formBuilder: FormBuilder,
@@ -53,8 +55,8 @@ export class SearchResourceComponent implements OnInit {
console.log(data);
data.forEach(element => {
this.options.push(element)
- });
- // this.options = data.
+ });
+ this.resourceSelect.openPanel();
}, error=>{
window.alert('error' + error);
})