Realtime filter on DELETE event not working

I've been trying to get realtime filters to work for an app I'm developing. I have noticed that the filter works as expected when listening for UPDATE events, but not for DELETE events. I have verified that I have all the Replication settings enabled, and have run the alter table "test" replica identity full; command.

When I run the code below, the function that currently logs the payload executes any time any row is deleted from the table, even though I have a filter for rows where id == rowId.

Is this the expected behavior, or am I doing something wrong?

supabase
    .channel(`channel-delete`)
    .on(
        'postgres_changes',
        {
            event: 'DELETE',
            schema: 'public',
            table: 'test',
            filter: `id=eq.${rowId}`
        },
        (payload) => {
            console.log(payload);
        }
    )
    .subscribe();
Was this page helpful?