SUPPORT-9415: Fix
This commit is contained in:
parent
f098619107
commit
a1563263c1
1 changed files with 16 additions and 8 deletions
|
|
@ -11,22 +11,30 @@ export class RowUpdateService extends Behavior implements OnDestroy {
|
|||
|
||||
private updateService: StatusUpdateService;
|
||||
private subscription: Subscription;
|
||||
private grid: GridV2;
|
||||
|
||||
initialize() {
|
||||
super.initialize();
|
||||
let grid = this.getScript(GridV2);
|
||||
this.grid = this.getScript(GridV2);
|
||||
this.updateService = this.injector.get(StatusUpdateService);
|
||||
}
|
||||
|
||||
postStart() {
|
||||
super.postStart();
|
||||
this.subscription = this.updateService.statusMessage.subscribe(value => {
|
||||
if (!value) {
|
||||
return;
|
||||
}
|
||||
grid.gridApi.forEachNode(rowNode => {
|
||||
if (rowNode.id == value.appNumber) {
|
||||
let rowData = rowNode.data;
|
||||
rowData[this.statusColId] = value.status;
|
||||
rowNode.updateData(rowData);
|
||||
}
|
||||
});
|
||||
let gridApi = this.grid.getGridApi();
|
||||
if (gridApi) {
|
||||
gridApi.forEachNode(rowNode => {
|
||||
if (rowNode.id == value.appNumber) {
|
||||
let rowData = rowNode.data;
|
||||
rowData[this.statusColId] = value.status;
|
||||
rowNode.updateData(rowData);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue