Closed eberberich closed 1 month ago
Any ideas here?
I looked through the source code of your app (which I normally don't do), and it seems that you are overwriting the data on every load. You register event listeners on Y.Arrays that you overwrite when you enable persistence.
Checklist
Describe the bug
The observe callback for (a) nested Y.Array(s) in a Y.Map is not executed when indexeddb persistence is in place.
To Reproduce
Run the attached minimal example persistence-problem.zip
npm install
npm run dev
yArray.observe
callback is executed) - with every interval callback in the code// const persistence = new IndexeddbPersistence(dbName, ydoc);
Search in
index.js
for PROBLEM 1/2/3 to find the code placesExpected behavior
The observe callbacks for the nested arrays work, and the nested arrays do not start from scratch upon page reloads!
Environment Information