Weird UI layout in SwiftUI .swipeActions

OK after I'm done with my last issue I came across some weird UI layout

this is really a serious issue because afterward it looks like this😂

why?

I've never met this kind of issue before in my same code before upgrading to Ventura

code:

List {

...
                Section {
                    ForEach(data) { datum in
                        TableRow(data: datum)
                            .swipeActions {
                            Button(role: .destructive) {
                                data.delete(datum)
                            } label: {
                                Label("Delete", systemImage: "trash")
                            }
                        }
                    }
                }
...
}

Works for me

I have a simplified example tried on macOS Ventura which seems to working ok.

Please check

Check your TableRow code, try to replace with TableRow with Text and see if it works

My Code

struct Message: Identifiable {
    var text: String
    
    var id: String {
        text
    }
}


struct ContentView: View {
    
    let messages = [Message(text: "aaa"),
                    Message(text: "bbb"),
                    Message(text: "ccc")]
    
    var body: some View {
        VStack {
            List {
                Section {
                    ForEach(messages) { message in
                        Text(message.text)
                            .swipeActions {
                                Button(role: .destructive) {
//                                    data.delete(datum)
                                } label: {
                                    Label("Delete", systemImage: "trash")
                                }
                            }
                    }
                }
            }
        }
    }
}
Weird UI layout in SwiftUI .swipeActions
 
 
Q