Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Created January 5, 2023 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krzyzanowskim/8728c940e74823855883308fb60b4b58 to your computer and use it in GitHub Desktop.
Save krzyzanowskim/8728c940e74823855883308fb60b4b58 to your computer and use it in GitHub Desktop.
FB11923700
/// NavigationSplitView default a List in left view to Sidebar style, and then swipeActions modifier stop working. It's a multi level regression. The swipeActions has been broken for a while, but in macOS 12 it didn't work in .sidebar list style neither
NavigationSplitView {
List {
ForEach(list, id: \.self) { item in
HStack {
Text(item.title)
}
.contentShape(Rectangle())
}
.swipeActions(edge: .leading) {
Button {
//
} label: {
Text("O")
}
}
}
.listStyle(.inset) // <- works
.listStyle(.sidebar) // <- doesn't work
} detail: {
Text("foo")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment