Post

Replies

Boosts

Views

Activity

Comment on Enabling undo with multi-model schema
as Borisy did I managed to have it working with by getting the undo manager from the environment on the ContentView @Environment(\.modelContext) private var modelContext @Environment(\.undoManager) private var undoManager Then I use the onAppear modifier .onAppear() { modelContext.undoManager = undoManager } Then it works as expected.
Mar ’24