Supabase filter by #459
Closed
albertcito
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Oh that documentation is not meant to suggest a global variable. I'll look at clarifying and expanding on that in the docs. For this case you probably want to use a lookup table to create a different synced observable for each author. const messages$ = observable((authorId: string) => syncedSupabase({
supabase,
collection: 'messages',
// Filter by the current user
filter: (select) => select.eq('user_id', authorId)
}))
const messages12345$ = messages$['12345']
const messages12345 = messages$['12345'].get(); This way you can treat |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The documentation displays filter by could be customized changing a global variable.
Why this library doesn't allow just call it in this way?:
But now I have to modify the global variable 👎 , in order to be able to change the filter. It hide what the
.get()
function is getting and I have to reset each global variable in order to use it again :/Beta Was this translation helpful? Give feedback.
All reactions