I have an observable, what get all boxes from server. Every boxes has a property(lastUpdateBy), what I want to change to a full name from userservice. The problem is, Ag-grid always show the result much sooner, then data changes. After refresh the grid, data appear properly. Any idea, what is the problem here? Thanks
getAllBox() {
this.BoxesService.getAllBoxes().subscribe(responseData => {
responseData.Boxes.map(item => {
this.userService
.getUserName(item.lastUpdatedBy)
.subscribe(fullName => {
item.lastUpdatedBy = fullName
})
})
this.agGridData = responseData.boxes
})
}