I have a list of people that I am looping through. Each person has their own ion-item
. The list has scrollbars so I can scroll up and down and see all the people.
Using typescript, how can I scroll to the bottom of the list? When the page loads I see the people from the top but would like to call a function that jumps me to the bottom of the list.
<ion-slide class="add-scrollbars">
<ion-list>
<ion-item *ngFor="let p of gameData?.points">
<h2><strong>{{ p.name }}</strong></h2>
</ion-item>
</ion-list>
</ion-slide>
My CSS to add the scrollbars ...
.add-scrollbars {
overflow-y: scroll;
}
My list is being updated constantly and I want to have a function that I can call when there's an update that will jump me to the bottom of the list .... but quite often I will have scrolled up and currently don't see new entries being added to the bottom