[#1167] Autofocus birthday field in restore flow

- the BD field is automatically focused
This commit is contained in:
Lukas Korba 2024-04-03 08:15:53 +02:00
parent 93b44b0b7f
commit 2755f3c2c0
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import UIComponents
public struct ImportBirthdayView: View {
var store: ImportWalletStore
@FocusState public var isFocused: Bool
public init(store: ImportWalletStore) {
self.store = store
@ -33,6 +34,7 @@ public struct ImportBirthdayView: View {
TextField("", text: viewStore.bindingForRedactableBirthday(viewStore.birthdayHeight))
.frame(height: 40)
.font(.custom(FontFamily.Archivo.semiBold.name, size: 25))
.focused($isFocused)
.keyboardType(.numberPad)
.autocapitalization(.none)
.multilineTextAlignment(.center)
@ -41,6 +43,9 @@ public struct ImportBirthdayView: View {
.frame(height: 1)
.offset(x: 0, y: 20)
}
.onAppear {
isFocused = true
}
Spacer()