Skip to content

Commit c2bf0df

Browse files
committed
Disable auto-correct for class and image search fields
1 parent a1efffd commit c2bf0df

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

HeaderViewer/ContentView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ private struct AllRuntimeObjectsView: View {
143143
}
144144
.id(runtimeObjects) // don't try to diff the List
145145
.searchable(text: $viewModel.searchString)
146+
.autocorrectionDisabled() // turn of auto-correct for the search field
146147
.searchScopes($viewModel.searchScope) {
147148
Text("All")
148149
.tag(RuntimeTypeSearchScope.all)

HeaderViewer/ImageClassPicker.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ struct ImageClassPicker: View {
127127
}
128128
.id(runtimeObjects) // don't try to diff the List
129129
.searchable(text: $viewModel.searchString)
130+
.autocorrectionDisabled() // turn of auto-correct for the search field
130131
}
131132
case .loadError(let error):
132133
StatusView {

HeaderViewer/NamedNodeView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct NamedNodeView: View {
4242
}
4343
}
4444
.searchable(text: $searchText)
45+
.autocorrectionDisabled() // turn of auto-correct for the search field
4546
.navigationTitle((node.name.isEmpty && node.parent == nil) ? "/" : node.name)
4647
}
4748

0 commit comments

Comments
 (0)