List Single Selection

I have some lines of code below where I can make multiple selections.

import SwiftUI

struct ContentView: View {
	@State private var selectedUsers: Set<String> = []
	@State var users = ["Susan", "Kate", "Natalie", "Kimberly", "Taylor", "Sarah", "Nancy", "Katherine", "Nicole", "Linda", "Jane", "Mary", "Olivia", "Barbara"]
	
    var body: some View {
		VStack {
			List(selection: $selectedUsers) { 
				ForEach(users, id: \.self) { user in
					Text(user)
				}
			}
			.environment(\.editMode, .constant(.active))
		}
    }
}

So the blue selection symbol appears as shown in the screenshot above. That's good. But that's not what I'm after. I just want to select one row at a time.

import SwiftUI

struct ContentView: View {
	@State var selectedUser: String?
	@State var users = ["Susan", "Kate", "Natalie", "Kimberly", "Taylor", "Sarah", "Nancy", "Katherine", "Nicole", "Linda", "Jane", "Mary", "Olivia", "Barbara"]
	
    var body: some View {
		VStack {
			List(selection: $selectedUser) { 
				ForEach(users, id: \.self) { user in
					Text(user)
				}
			}
			.environment(\.editMode, .constant(.active))
		}
    }
}

In the lines of code above, I only let myself select one row at a time. And I don't get the blue selection symbol. I wonder why? I find two or three websites where they have similar lines of code and where they select one row at a time. And they have the blue selection symbol. Why don't I get it?

Mucho thankos for reading.

Please, when you paste images, reduce their size, that will make your post much easier to read.

Hmm... I'm sorry. I realize that I should have done that. I cannot edit the topic any more.

No problem, next time. If that may help, you could try to have a multiple selection but limit to one item: https://medium.com/fantageek/how-to-programatically-select-row-in-list-in-swiftui-a4bfe54fc03e

Thanks. I'm not sure how that helps, though. In the meantime, Paul from Hacking with Swift shows how the List guy works. I've tested the exact lines of code he has, and the selection symbol doesn't appear, either. That's odd. The article is not even one year old. By the way, I'm using Xcode 14.3. https://www.hackingwithswift.com/quick-start/swiftui/how-to-allow-row-selection-in-a-list

List Single Selection
 
 
Q