ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.02k stars 13.51k forks source link

feat: (ion-virtual-scroll) Scroll to / scroll top. #23424

Closed y0nd0 closed 3 years ago

y0nd0 commented 3 years ago

Feature Request

Ionic version: 5.x

Describe the Feature Request I wish I could scroll the ion-virtual-scroll programmatically to scroll to top before I generate complete new item list.

Docs (In Angular Material there is a method scrollTo (click link). Maybe this helps.)

Describe Preferred Solution Add the possibility to set the scroll position like scrollTop. In my case I want to scroll to top before I change the item list. Otherwise the items are weirdly rendered (glitch / overlapped).

I alrady tried to set the scroll position like for a HTMLElement but this does not work. Btw. I use Angular.

liamdebeasi commented 3 years ago

Thanks for the issue. With upcoming major versions of Ionic Framework, we are going to be transitioning to using Angular's CDK Scroller. As a result, we have a freeze on new features and bug fixes on ion-virtual-scroll. See https://material.angular.io/cdk/scrolling/overview for how to get started with CDK Scroller. We are working on proper transition docs as well!

ionitron-bot[bot] commented 3 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.