Closed fclmman closed 2 years ago
@fclmman Hi! May I ask you to look at https://stackblitz.com/edit/ngx-ui-scroll-append-async and make necessary updates to reproduce the issue? I implemented setInterval-append process, which works fine, as I can see, wether you are on the tab or not.
The main point of any async updates is to provide synchronous chaining on the Scroller's end:
async doAppend(item: MyItemData) {
await this.datasource.adapter.relax(); // wait for all the internal processes on the Scroller's end are done
this.appendToDatasource(item); // make sure that we updated the external data source on the App side
await this.datasource.adapter.append({ // push updates to the Scroller
items: [item],
eof: true
});
this.datasource.adapter.clip(); // cut off extra (out-of-view) items if needed
}
@dhilt hi, i'll check your solution in closest time, but looks quite similar to what we have implemented already. Can there be any additional issues with OnPush strategy?
@fclmman Who knows... We'll investigate the problem and maybe it will be the App logic issue, maybe it will be something on the Scroller's end. Async updates in a passive tab must work anyway, but to know what exactly is happening and how to fix it the repro is needed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed within seven days if no further activity occurs. If it needs to remain open, add the "permanent" label.
This issue has been automatically closed because it was stale.
Hi! I am using ngx-ui-scroll, and got an issue when running app in background tab. In our app we need to update data and append new rows, but because of browser throttling and asynchronousity in vscroll workflow, in background tab it seems to be broken and new nodes are not appended to dom.