Liveprovider subscription update on filter param changed #6366
quick691fr
started this conversation in
General
Replies: 2 comments 21 replies
-
Hello @quick691fr, There is a similar issue here. Removing filters from the subscription will be a solution. This way, the This might cause unnecessary invalidation in some cases, but I don't think it's a big problem. |
Beta Was this translation helpful? Give feedback.
13 replies
-
I too am running into this issue. Switching to useList does work because it listens for all changes on my table. Desired: const { data: job } = useOne<JobResult, HttpError, JobResult>({
resource: 'job_results',
liveMode: 'auto',
id: jobKey,
}) Workaround: const { data: jobs } = useList<JobResult, HttpError, JobResult>({
resource: 'job_results',
liveMode: 'auto',
pagination: {
pageSize: 1,
},
sorters: [{ field: 'created_at', order: 'desc' }],
})
console.log('jobs', jobs)
const job = jobs?.data?.find((job) => job.id === jobKey) |
Beta Was this translation helpful? Give feedback.
8 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.
-
Hi guys,
I'm trying to make a useList working with liveProvider and supabase when filter changed.
I have this code retrieving widgets from supabase :
dashboardId is a prop of the component containing this useList, so basically, I can request this component with different dashboardId.
I checked the websocket and I got a subscription for realtime events :
and realtime changes on widgets of dashboard 2 is working fine.
But when I changed my dashboardId Props by selecting a new dashboard on an external Select, the realtime subscription is not updated and I didn't get LiveEvents on new dashboard. My guess is the realtime subscription should reflect the filter change ??
Thanks
Beta Was this translation helpful? Give feedback.
All reactions