# Fetch collection after element load

**URL:** <https://community.weweb.io/t/fetch-collection-after-element-load/6553>\
**Category:** Ask us anything\
**Tags:** supabase\
**Created:** [January 23, 2024, 12:07am UTC](https://community.weweb.io/t/fetch-collection-after-element-load/6553 "2024-01-23T00:07:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/sam1/32/6724_2.png) [@sam1](https://community.weweb.io/u/sam1)\
**Post date:** [January 23, 2024, 12:07am UTC](https://community.weweb.io/t/fetch-collection-after-element-load/6553/1 "2024-01-23T00:07:47Z")

</div>

Hello,

I am trying to load a collection that uses a filter from a date input, and have it fetch once the variable is set. I thought that on page load would work but it the variable is set after the on load workflows. Whats the best way around this?

Appreciate the help,  
Thanks!

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/e/e025eefdf1e6088561b9ee56113695d5cdc76793.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/8e2056d215b0438e3058260df80d2032e5b6adb4.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/841511112554c5bc2efade046814648d993a2a00.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [January 23, 2024, 8:04am UTC](https://community.weweb.io/t/fetch-collection-after-element-load/6553/2 "2024-01-23T08:04:15Z")

</div>

Fetch collections on mounted of your component 🙂  
It’s after it gets “mounted” in your page.

 ![Screenshot 2024-01-23 at 09.03.23](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/cbb52c724ff146fce88272ae4b2450218a998f45.png)
