Trying to create a List that sorts by some criteria and handles searchable without any samples is only made even more difficult by the textfield constantly refocusing itself. So I can't even tab away from it. This is some awful bug in SwiftUI.
class FileSearcher: ObservableObject {
@Published var searchIsActive = false
@Published var searchText = ""
var files: [File] = []
...
}
NavigationSplitView() {
}
.searchablel(text: $fileSearcher.searchText,
isPresented: $fileSearcher.searchIsActive,
placement: .sidebar,
prompt: "Filter")