I have a window with some text fields and when tabbing between fields, focus moves from the bottom to top instead of top-down. How do you make it tab top-to-bottom?
var body: some View {
VStack {
TextField("First name", text: $firstName)
.modifier(InputModifier())
TextField("Last namee", text: $lastName)
.modifier(InputModifier())
})
}
}
Add .focusable()
to the views and they will tab top-to-bottom.
var body: some View {
VStack {
TextField("First name", text: $firstName)
.modifier(InputModifier())
.focusable()
TextField("Last name", text: $lastName)
.modifier(InputModifier())
.focusable()
})
}
}