1 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
4 selector: 'rdp-input-editor',
5 styleUrls: ['./rdp-input-editor.component.scss'],
7 <input class="input-editor" [disabled]="isColumnDisabled"
8 [(ngModel)]="columnValue"
9 type="text" name="{{columntitle}}"
11 (change)="detectChange(columnValue)">
14 export class RdpInputEditorComponent implements OnInit {
16 @Input() rowdata: any;
17 @Input() columntitle: any
18 @Input() disabled: boolean;
20 @Output() changedColumnValue = new EventEmitter<any>();
23 isColumnDisabled:boolean;
28 if (this.rowdata != null || this.rowdata != undefined) {
29 let rowObj = JSON.parse(this.rowdata);
30 let column = this.columntitle;
31 this.columnValue = rowObj[column];
33 this.columnValue = null;
35 this.isColumnDisabled = this.disabled;
38 detectChange(changedValue) {
39 this.changedColumnValue.emit(changedValue);