summaryrefslogtreecommitdiffstats
path: root/cds-ui/client
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-03-31 12:44:58 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-31 12:44:58 +0000
commit43ce732ffb11a11a8c683d6ac85fd8cd3e8e00ca (patch)
treeee3d6a0c7d9fedcf365cce1e9f3c31a6bd0747ce /cds-ui/client
parent2e1b66c1ce9ec1c2f9e5b3f500dd10eca4b7d596 (diff)
parent67ef9b7f4cb9b59e1da4c93bce86d57bb9276d37 (diff)
Merge "search resources changes"
Diffstat (limited to 'cds-ui/client')
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html2
-rw-r--r--cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts15
2 files changed, 9 insertions, 8 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html
index ab696286b..236196b9b 100644
--- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html
+++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html
@@ -23,7 +23,7 @@
<input type="text" [(ngModel)]="searchText" placeholder="Search Resources" matInput [matAutocomplete]="auto" formControlName="search_input">
<button matSuffix mat-icon-button><mat-icon>search</mat-icon></button>
<mat-autocomplete #auto="matAutocomplete">
- <mat-option *ngFor="let option of options | search : searchText" [value]="option">
+ <mat-option (click)="selected(option)" *ngFor="let option of options | search : searchText" [value]="option">
{{option}}
</mat-option>
</mat-autocomplete>
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 16129b74a..7f2745e63 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
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild, EventEmitter, Output } from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
@Component({
selector: 'app-search-resource',
@@ -27,17 +27,18 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms';
})
export class SearchResourceComponent implements OnInit {
- myControl: FormGroup;
-
+ myControl: FormGroup;
+ @Output() resourcesData = new EventEmitter();
+ options: string[] = ['One','One1', 'Two', 'Three'];
constructor(private _formBuilder: FormBuilder) { }
- options: string[] = ['One','One1', 'Two', 'Three'];
-
- ngOnInit() {
+ ngOnInit() {
this.myControl = this._formBuilder.group({
search_input: ['', Validators.required]
});
}
-
+ selected(value){
+ this.resourcesData.emit(value);
+ }
}