|
|
@@ -3,17 +3,25 @@ import SwiftUI |
|
|
|
|
|
|
|
extension MeetupId { |
|
|
|
public struct TV: View { |
|
|
|
@StateObject var textField = BusUI.TextField(K.testTextApp, K.testTextUI) |
|
|
|
let id: String |
|
|
|
@StateObject var vm = TVM() |
|
|
|
|
|
|
|
public init(_ id: String) { |
|
|
|
textField.id = id |
|
|
|
self.id = id |
|
|
|
} |
|
|
|
|
|
|
|
public var body: some View { |
|
|
|
TextField("TV", value: $textField.v, formatter: BusUI.TextFieldSource()) |
|
|
|
TextField("TV", value: vm.$textField.v, formatter: BusUI.TextFieldSource()) |
|
|
|
.padding(8) |
|
|
|
.border(Color.blue) |
|
|
|
.animation(.easeInOut(duration: 0.3)) |
|
|
|
.onAppear { |
|
|
|
vm.setup(id) |
|
|
|
} |
|
|
|
.onChange(of: id) { newValue in |
|
|
|
vm.setup(newValue) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |