Hello!
I’m trying to use observeDeep() to synchronize our view model with our yjs document.
In our document, we have a Y.Array of Y.Map. When a Y.Map is deleted from the Y.Array, I want to delete the corresponding objects in our view model.
I know I can use the event.changes.deleted to get a list of items deleted from the Y.Array, and that I can do a item.content.getContent() to get to the Y.Map instance that was removed.
My problem is, I want to be able to do a Y.Map.get(“_id”) field of the Y.Map so I can correlate it against our view model.
Unfortunately, since the Y.Map is no longer a member of the Y.Doc, I can’t read any of its fields.
Is there any work around to be able to identify which Y.Map was deleted?
Thank you!
Jeremy