Does this solve the issue? It works on my app.
import SwiftUI
struct FieldView: View {
enum Field: Hashable {
case amountField
case descriptionField
case categoryField
}
@FocusState private var focusedField: Field?
@State var description = ""
var body: some View {
TextField("Description" ,text: $description)
.focused($focusedField, equals: .descriptionField)
.keyboardType(.default)
.onAppear() {
focusedField = .descriptionField
}
.onSubmit {
focusedField = .categoryField
}
.submitLabel(.next)
}
}
}