b1fb37a186120dd2e66db59155c1a77d087b54c8
[sdc.git] /
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   @Input()
22   values: DropdownValue[];
23
24   constructor() {
25     super();
26   }
27
28     onSave() {
29         this.baseEmitter.emit(JSON.parse(this.value));
30     }
31
32 }