Back to top button on large lists

Hello everyone. I have large lists in my app and would like to add back to top button which will appear after user scroll specific numbers of pixels from the top for example. For my current implementation, I use IonContent’s event ionScroll which triggers whenever scrolling on page occurs. Then I check if
event.detail.scrollTop > 1000, and if condition is true I show back to to button, otherwise hide it.

This solution works indeed but not sure if it will affect performance on low end devices because app needs to check condition written above whenever new scroll on page occurs.

Is there maybe another solution which is more “performance friendly”?


Anyone? :slight_smile: