# How to scroll to top when pagenation is clicked?

**URL:** <https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488>\
**Category:** Ask for Help\
**Created:** [July 4, 2023, 1:18pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488 "2023-07-04T13:18:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cloudlee](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cloudlee](https://community.glideapps.com/u/cloudlee)\
**Post date:** [July 4, 2023, 1:18pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/1 "2023-07-04T13:18:39Z")

</div>

Hello.  
My users are annoyed by the fact that it’s not automatically scroll to top when a pagenation is clicked.  
Plus it remains in the same page when searching something.  
Is there any solution to this?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 5, 2023, 11:50pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/2 "2023-07-05T23:50:39Z")

</div>

> [@cloudlee](#):
>
> Plus it remains in the same page when searching something.

Can you explain this part? What is your desired behaviour?

---

<div class="post-metadata">

**Author:** ![virgiliojunior](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/virgiliojunior/32/41503_2.png) [@virgiliojunior](https://community.glideapps.com/u/virgiliojunior)\
**Post date:** [July 7, 2023, 1:19pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/3 "2023-07-07T13:19:27Z")

</div>

I was about to open a post about it.

Anyone has an idea how to achieve this?

It’s a bad user experience to click on next page without scrolling to the top, or to first item of collection list.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 7, 2023, 11:25pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/4 "2023-07-07T23:25:14Z")

</div>

> [@virgiliojunior](#):
>
> It’s a bad user experience to click on next page without scrolling to the top, or to first item of collection list.

Agree with this @tristan , but can get pretty complicated to set up when you have a lot of collections on the same screen.

---

<div class="post-metadata">

**Author:** ![cloudlee](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cloudlee](https://community.glideapps.com/u/cloudlee)\
**Post date:** [July 10, 2023, 10:37am UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/5 "2023-07-10T10:37:38Z")

</div>

What do you mean?  
I know a colleciton can have collections inside.  
But can they have pagenations as well?  
I hope not.  
Then why not only counting the root collection, meaning scrolling to the top of the root collection when a pagenation is clicked?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 10, 2023, 11:01am UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/6 "2023-07-10T11:01:16Z")

</div>

> [@cloudlee](#):
>
> What do you mean?

He means what he said - you can have multiple collections on the same screen, like below:

 ![CleanShot 2023-07-10 at 18.56.54@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/1/2108140e05fa4b8cad210f570135b96f1e0facf9.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 10, 2023, 1:31pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/7 "2023-07-10T13:31:34Z")

</div>

I was referring more to the coding side of it, when you have multiple collections on the same screen, it may get hard for the system to understand which “top of the collection” they should scroll to, but it’s just my guess.

---

<div class="post-metadata">

**Author:** ![cloudlee](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cloudlee](https://community.glideapps.com/u/cloudlee)\
**Post date:** [October 16, 2023, 12:51pm UTC](https://community.glideapps.com/t/how-to-scroll-to-top-when-pagenation-is-clicked/63488/8 "2023-10-16T12:51:56Z")

</div>

My desired behavior is to go to the top of the page or the collection view when clicked a pagination.  
I understood what you meant. But not scrolling to the top is a bad UX.
