I have this logic here, which creates many observable and executes a call back after each of them is done.
from(rows).pipe(
concatMap(row => this.uploadItem(row))
).subscribe(response => {
this.currentRowNode.data.uploadStatus = UploadStatus.Success;
this.currentRowNode.data.cmsRowId = response.responsePayload.cmsRowId
this.currentRowNode.setData(this.currentRowNode.data);
});
currentRowNode: RowNode;
uploadItem(rowNode: RowNode): Observable<any> {
this.currentRowNode = rowNode;
rowNode.data.uploadStatus = UploadStatus.Uploading;
rowNode.updateData(rowNode.data);
return this.importService.uploadItem(rowNode.data)
}
My issue here is that I'd like to be able to subscribe to something that would tell me uploadItem
has been called for each of the rows
Where would that go ?