I have a List
that can contain TextField
views on macOS. I want tabbing between the TextField
views inside the List
to work the way it does with TextField
views that are not inside a List.
But pressing the tab key to navigate to a TextField
inside a List
just does not seem to work.
I tried attaching a focusable(false)
modifier to the List and a focusable(true)
modifier to the TextField views. Is there a trick to this?
var body: some View {
TextField("Title:", text: $title, prompt: Text("Title"))
List {
TextField("Title 2:", text: $title2, prompt: Text("Title 2"))
TextField("Title 3:", text: $title3, prompt: Text("Title 3"))
}
}