const doc = new Y.Doc() const yarray = doc.getArray('entities') const ymap = new Y.Map() yarray.push([ymap]) ymap.set('position', [0, 0, 0]) const undoManager = new Y.UndoManager([yarray])
Later, I retrieve the array, modify-in-place, and set it back:
const pos = ymap.get('position') pos = 1.5 ymap.set('position', pos)
When I undo this change, events are fired, but the content is the new value (i.e. [0, 1.5, 0] on undo). Is there a way to indicate to Yjs that this modification-in-place should be treated as a real change?