Supabase + Backend pagination + infinite scroll

Hey,
while implementing backend pagination with infinite scroll using Xano is straightforward, as Joyce showed in this video, it does not seem to be so straightforward when using Supabase. With the paginator element it works as expected, however, for infinite scroll, how do I fetch the next page of items without the possibility of setting an offset value?

Hi @julian :wave:

We don’t have that option in Supabase collections yet because, for now, we want to keep the collection’s UX the same for all plugins.

So you have 2 fallback options:

  1. Create a collection that uses the Supabase range option with the REST API plugin

  2. Use the Supabase select action in a workflow with the range option: Supabase database select | WeWeb documentation

If you choose option 2. I’d recommend adding the items in an array variable and binding your items to that variable instead of a collection.

Does that help?

1 Like

Thank you very much, Joyce! That sounds great. I’ll try option 2.

1 Like