Last active
September 24, 2021 02:04
-
-
Save gtokman/564eec9573550b63be3de3ad75e6a6f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NavigationView { | |
List { | |
ForEach(businesses, id: \.id) { business in | |
Text(business.name) | |
} | |
} | |
.listStyle(.plain) | |
.navigationTitle(Text("Restaurant")) | |
// Add the new searchable modifier on List | |
.searchable(text: $searchText) { | |
ForEach(completions, id: \.self) { completion in | |
Text(completion).searchCompletion(completion) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment