UPDATE : to answer to your other questions :
- I have checked if there’s no type error
- in the log, I can’t find any info on the collections, I still only have the fake ones (from the UI kit I believe ?)
UPDATE : to answer to your other questions :
You have a pagination, so here you are able to search only on the first 20 items I guess, (the array show 299 items but you have probably only the first 20 items inside filled and the others are null)
I think a more powerful approach would be to use the advanced way to select fields on your collection so you can embed the concession data directly on every remise item.
Here it would be something like id, concessions(name)
Okay I see. That’s exactly what I was wondering at first : the advanced method works but it seems that doing a lookup with pagination isn’t very efficient (it’s likely I’m missing something but as the advanced method works, i don’t know !)
Thanks anyway @Alexis for your time
Lookup is executed in the frontend, with the data your collection is currently holding. Supabase pagination is performed on the backend, it means you only receive the data related to one page at time.
So when you apply the lookup it search the item in the current page of the collection, here the first 20 items as the offset is at 0.
Your lookup would have worked if you removed the pagination, or created another collection without the pagination but you would have to fetch two times the same collection, that’s why I suggested to embed directly your concessions data inside the remises data.
Ok I see. The only part where I disagree is on pagination : my “Concessions” collection was set up with a sort and a pagination params. I tried without the sort param based on the name and everything worked (even with the pagination up to 20 per page).
Maybe Weweb struggles when there is a sorting parameter set up on the the collection ?
It only mean the item you searched was on the first 20 items on your unsorted collection, no ? Did you try with others item, does it works with all of them ?
Yes you’re right, everything’s good now !