Scroll to bottom of IonList? (Ionic v4 React)

Hi,

I’ve checked the documentation on the ionic react site here and can’t see a method to call for an IonList to scroll to bottom.

Anyone know if this is possible please?

Thanks,

Stephen

Hi @supaevensteven, I have the same issue, still I haven’t got any success. I have tried this:-

getContent() {
return document.querySelector(‘ion-content’);
}
scrollToBottom = () => {
this.getContent().scrollToBottom(500);
}

It’s showing me error, "Object is possibly ‘null’. "

If you got any solution please let me know.

  const scrollToBottom = () => {
    let list = document.querySelector("ion-content");
    return list && list.scrollToBottom();
  };
1 Like

Thank you @aaronksaunders, it’s worked.

1 Like