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