Created
January 22, 2021 03:26
-
-
Save azamsharp/4cd28f3a3fd6170c174d4be4910419f2 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 { | |
VStack { | |
List(customers, id: \.self) { customer in | |
NavigationLink( | |
destination: DetailView(customer: customer), | |
label: { | |
HStack { | |
Text(customer) | |
Spacer() | |
}.contentShape(Rectangle()) | |
}) | |
}.listStyle(PlainListStyle()) | |
} | |
.onAppear { | |
// selectedCustomer = nil | |
} | |
.navigationTitle("Customers") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment