Skip to content

Commit 8b9eed4

Browse files
committed
Disable search autocorrect.
1 parent c3342e7 commit 8b9eed4

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

Shared/Samples/Geocode offline/GeocodeOfflineView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct GeocodeOfflineView: View {
4646
var body: some View {
4747
GeocodeMapView(model: model, viewpoint: $viewpoint)
4848
.searchable(text: $searchText, prompt: "Type in an address")
49+
.autocorrectionDisabled()
4950
.onSubmit(of: .search) {
5051
submittedSearchText = searchText
5152
}

Shared/Samples/Query feature table/QueryFeatureTableView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ struct QueryFeatureTableView: View {
2929
MapView(map: model.map)
3030
.errorAlert(presentingError: $error)
3131
// Makes the search bar.
32-
.searchable(text: $searchBarText, prompt: Text("Search state names"))
32+
.searchable(text: $searchBarText, prompt: "Search state names")
33+
.autocorrectionDisabled()
3334
.onSubmit(of: .search) {
3435
model.currentQuery = searchBarText
3536
}

Shared/Samples/Search for web map/SearchForWebMapView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ struct SearchForWebMapView: View {
7474
placement: .navigationBarDrawer(displayMode: .always),
7575
prompt: "Web Maps"
7676
)
77+
.autocorrectionDisabled()
7778
.task(id: query) {
7879
// Load new results when the query changes.
7980
resultsAreLoading = true

Shared/Supporting Files/Views/CategoriesView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private extension CategoriesView {
140140
}
141141
}
142142
.searchable(text: $query, placement: .navigationBarDrawer(displayMode: .always))
143+
.autocorrectionDisabled()
143144
.scrollDismissesKeyboard(.immediately)
144145
}
145146
}

Shared/Supporting Files/Views/FavoritesView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ private extension FavoritesView {
132132
}
133133
}
134134
.searchable(text: $query, placement: .navigationBarDrawer(displayMode: .always))
135+
.autocorrectionDisabled()
135136
}
136137
}
137138
}

0 commit comments

Comments
 (0)