We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 347b166 commit 16b0ec9Copy full SHA for 16b0ec9
src/loader/handle-realtime-updates.ts
@@ -12,6 +12,14 @@ export async function handleRealtimeUpdates(
12
context: LoaderContext,
13
options: PocketBaseLoaderOptions
14
): Promise<boolean> {
15
+ // Check if a custom filter is set
16
+ if (options.filter) {
17
+ // Updating an entry directly via realtime updates is not supported when using a custom filter.
18
+ // This is because the filter can only be applied via the get request and is not considered in the realtime updates.
19
+ // Updating the entry directly would bypass the filter and could lead to inconsistent data.
20
+ return false;
21
+ }
22
+
23
// Check if data was provided via the refresh context
24
if (!context.refreshContextData?.data) {
25
return false;
0 commit comments