virtua
virtua copied to clipboard
Add restore scroll option to CacheSnapshot getter
fix #415
TODO support scroll from bottom usecase
It would be great to support not only scroll from bottom use case, but also allow to set any initial scroll position. Something like this:
initialScrollOffset?: number;
initialScrollIndex?: number | ScrollToIndexOpts & { index: number };
Update to my last comment: initialScrollOffset might be hard to implement, if it's not restoring from snapshot case. It probably would need to do some measurements in order to work correctly. So personally for me initial index (with ScrollToIndexOpts support) would be enough :)
Prefer #455