Add an input to the virtual scroll container that allows developers to set the index of the first element that should be visible in the viewport.
We should also allow specifying an index that is greater than the length of the currently loaded data. Once the data loads we can scroll to the specified index.
I'd use this to do the actual scrolling:
try {
this._elementRef.nativeElement.scrollTo({ left: 0, top, behavior: 'smooth' });
} catch (e) {
// IE Sucks
window.scrollTo(0, top);
}
I think we need a scrollToItem and a scrollToOffset implementation.
@mmalerba HI. Could you please approximately say when scrollToIndex method for autosize strategy will be implemented?
Most helpful comment
@mmalerba HI. Could you please approximately say when scrollToIndex method for autosize strategy will be implemented?