From 5505e42484efac0273627795583179d58f81a1ee Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Fri, 31 Jan 2020 17:10:17 +0530 Subject: Added RDP Library added RDP Library Issue-ID: PORTAL-826 Change-Id: If00af4c55b568bb4e41c789b6b18749d8bc96858 Signed-off-by: Sudarshan Kumar --- .../rdp-select-editor.component.ts | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts (limited to 'ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts') diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts new file mode 100644 index 00000000..a657a000 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts @@ -0,0 +1,43 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; + +@Component({ + selector: 'rdp-select-editor', + styleUrls: ['./rdp-select-editor.component.scss'], + template: ` + + + {{item.name}} + + + ` +}) +export class RdpSelectEditorComponent implements OnInit { + + @Input() rowdata: any; + @Input() columntitle: any; + @Input() data: any[]; + @Output() changedColumnValue = new EventEmitter(); + selected: any; + columnValue: any; + + constructor() { } + + ngOnInit() { + if (this.rowdata != null || this.rowdata != undefined) { + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + + } else { + this.columnValue = null; + } + this.selected = this.columnValue; + console.log(" this.selected :::", this.selected); + } + + detectChange(changedValue) { + this.changedColumnValue.emit(changedValue); + } + +} -- cgit 1.2.3-korg