1 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
4 selector: 'rdp-select-editor',
5 styleUrls: ['./rdp-select-editor.component.scss'],
7 <mat-select [(value)]="selected"
8 (selectionChange)="detectChange(columnValue)">
9 <mat-option *ngFor="let item of data" [value]="item.name">
15 export class RdpSelectEditorComponent implements OnInit {
17 @Input() rowdata: any;
18 @Input() columntitle: any;
20 @Output() changedColumnValue = new EventEmitter<any>();
27 if (this.rowdata != null || this.rowdata != undefined) {
28 let rowObj = JSON.parse(this.rowdata);
29 let column = this.columntitle;
30 this.columnValue = rowObj[column];
33 this.columnValue = null;
35 this.selected = this.columnValue;
36 console.log(" this.selected :::", this.selected);
39 detectChange(changedValue) {
40 this.changedColumnValue.emit(changedValue);