You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello team, thank you so much for this amazing library which I am loving to develop with.
I have Supabase and LegendState set up in my project, and everything is working fine until I noticed an issue when handling arrays across multiple devices.
Issue
I have a table with a column of type TEXT[], and I modify it using LegendState. The state is correctly updated locally and in the database. However, when I have two devices open:
Adding an item to the array updates correctly on both devices.
Removing an item from the array updates correctly in the database and on the first device’s local storage, and the second device receives the event (I have verified this), but the array is not updated on the second device.
The array only updates correctly on all devices when it becomes empty (i.e., when the last item is removed).
Table Schema
CREATETABLEoposiciones (
id textnot null,
user_id uuid,
titulo textnot null,
organismo TEXTNOT NULL,
ubicacion TEXTNOT NULL,
grupo TEXTNOT NULL,
exam_ids TEXT[] NOT NULL,
created_at timestamptz default now() not null,
updated_at timestamptz default now() not null,
deleted boolean default false,
PRIMARY KEY (id, user_id)
);
Description:
Hello team, thank you so much for this amazing library which I am loving to develop with.
I have Supabase and LegendState set up in my project, and everything is working fine until I noticed an issue when handling arrays across multiple devices.
Issue
I have a table with a column of type
TEXT[]
, and I modify it using LegendState. The state is correctly updated locally and in the database. However, when I have two devices open:Table Schema
LegendState Setup & Functions
Expected Behavior
exam_ids
array on one device, the update should be reflected on all devices.Actual Behavior
Steps to Reproduce
exam_ids
array → Works correctly on both devices.exam_ids
array on Device 1.Additional Notes
Would really appreciate your help in understanding if this is a bug or if I am missing something!
Thanks again for this amazing library! 🙌
cc @jmeistrich
The text was updated successfully, but these errors were encountered: