208bf54983b5f7ba42982bb4823694340a5d4cb4
[sdc.git] / catalog-ui / src / app / ng2 / components / dynamic-element / elements-ui / dropdown / ui-element-dropdown.component.ts
1 import { Component, EventEmitter, Output, Input } from '@angular/core'
2 import { BrowserModule } from '@angular/platform-browser'
3 import { UiElementBase, UiElementBaseInterface } from './../ui-element-base.component';
4
5 export class DropdownValue {
6   value:string;
7   label:string;
8
9   constructor(value:string,label:string) {
10     this.value = value;
11     this.label = label;
12   }
13 }
14
15 @Component({
16   selector: 'ui-element-dropdown',
17   templateUrl: './ui-element-dropdown.component.html',
18   styleUrls: ['./ui-element-dropdown.component.less'],
19 })
20 export class UiElementDropDownComponent extends UiElementBase implements UiElementBaseInterface {
21
22   @Input()
23   values: DropdownValue[];
24
25   constructor() {
26     super();
27   }
28
29     onSave() {
30         this.baseEmitter.emit(this.value);
31     }
32
33 }