I am going to get the user list after updating their detailed information.
First, I updated user detailed information using this.mediaService.updateImports(): Observable<any>
Second, I tried to display the updated user detailed information using this.getUserList();
By the way, this.getUserList()
didn't show the updated user List.
The updated user list was shown when I use setTimeout(() => { this.getUserList(); }, 3000);
instead of this.getUserList();
Also, the updated user list was shown when I call this.getUserList()
after a few seconds later.
this.mediaService.updateImports(
this.momentService.momentId,
this.momentService.moduleItemId,
doc
).pipe(
finalize(() => {
this.getUserList();
// setTimeout(() => { this.getUserList(); }, 3000);
})
).subscribe();
Could you please let me know how can I display the updated user list as soon as it is updated?
Kind regards, Jie Li.