UI Support for operation milestones
[sdc.git] / catalog-ui / src / app / ng2 / pages / composition / interface-operatons / operation-creator / add-input / add-input.component.ts
index c757d5f..5620d19 100644 (file)
@@ -38,6 +38,7 @@ export class AddInputComponent implements OnInit {
   @Input('dataTypeMap') dataTypeMap$: Observable<Map<string, DataTypeModel>>;
   @Input('isView') isView: boolean;
   @Input() existingInputNames: Array<string> = [];
+  @Input('defaultType') defaultType: string;
   @Output('onAddInput') onAddInputEvent: EventEmitter<InputOperationParameter>;
 
   dataTypeMap: Map<string, DataTypeModel>;
@@ -143,6 +144,9 @@ export class AddInputComponent implements OnInit {
   }
 
   showAddInput() {
+    if (this.defaultType) {
+      this.inputToAdd.type = this.dataTypeMap.get(this.defaultType) ? this.defaultType : undefined;
+    }
     this.showForm = true;
     this.showAddLink = false;
   }