diff options
author | Rachitha Ramappa <rachitha.ramappa@att.com> | 2020-04-09 20:34:21 +0530 |
---|---|---|
committer | Sunder Tattavarada <statta@research.att.com> | 2020-04-13 16:36:13 +0000 |
commit | 38fc3ff983009a1b27f142557a51ddc0f52c49ca (patch) | |
tree | f930335463ff2af4b3625295cb34c559e01a0575 /ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp | |
parent | 30cd0dcd682824e54eb9e7d9e812fb86dbe30edc (diff) |
Menu page edit and delete issue fix
Change-Id: Ibfb4533375e32a7eb4a0d7ae0aff9dbe13054e41
Issue-ID: PORTAL-867
Signed-off-by: rachitha.ramappa@att.com
(cherry picked from commit e799a2cae0e4d099ccc7cf077adf27f6c36c73b9)
Diffstat (limited to 'ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp')
2 files changed, 17 insertions, 1 deletions
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 index 24cb2e6f..5fd507ff 100644 --- 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 @@ -60,7 +60,6 @@ export class RdpSelectEditorComponent implements OnInit { @Input() data: any[]; @Output() changedColumnValue = new EventEmitter<any>(); columnValue: any; - constructor() { } ngOnInit() { @@ -68,12 +67,20 @@ export class RdpSelectEditorComponent implements OnInit { let rowObj = JSON.parse(this.rowdata); let column = this.columntitle; this.columnValue = rowObj[column]; + for(let i=0; i<this.data.length; i++){ + if(this.data[i]['id'] == this.columnValue){ + this.columnValue = this.data[i].name; + break; + } + } } else { this.columnValue = null; } + console.log("Select title: ",this.columntitle+" Select Value: ",this.columnValue); } detectChange(changedValue) { + console.log("Changed value : ", changedValue); this.changedColumnValue.emit(changedValue); } diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts index 954d0941..983a2726 100644 --- a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts @@ -224,6 +224,15 @@ export class RdpDataTableComponent<T> implements OnChanges, AfterViewInit, OnIni deleteRow(data: any) { this.dataTableService.delete(this.applicationService, data); + this.applicationService.statusResponse.subscribe(response => { + console.log("Response : ",response); + if(response == 200){ + this.applicationService.get(); + this.applicationService.updatedData.subscribe(updatedResponse =>{ + this.setData(updatedResponse); + }) + } + }) } applyFilter(filterValue: string) { |