adopted-ember-addons / ember-light-table

Lightweight, contextual component based table for Ember
http://adopted-ember-addons.github.io/ember-light-table/
MIT License
312 stars 131 forks source link

Stop scrolling to top on model update #746

Closed maxwondercorn closed 4 years ago

maxwondercorn commented 4 years ago

I'm implementing paging for one of my tables and onScrolledToBottom () calls a ember-concurrency task in the controller. The task updates a query parameter and the model is refreshed loading more records in the model. I'm using the ember data model directly on the table.

ELT sees the model change but scrolls back to the first row rather than staying at the current scroll position. Looking at the docs I didn't see anything relevant and it may not be possible based on how ELT functions.

I could utilize something similar to the ember array and pushObjects as shown in the examples but I have 26+ tables in the app. I do not want to create something bespoke if I don't have to.

The table is fixed header, occlusion rendered and could be displaying up to 30k rows if the user scrolls far enough. I'm using ELT v2 beta 5

maxwondercorn commented 4 years ago

I could not seem to solve this issue using DDAU so I created a modified component mimicking the pagination example. That provides the required pagination so I'm closing this issue