I have multiple CustomTextFields and when they are actively being edited I want to know which one is currently active. I have set tags but you can not reference the tag inside the onEditingChanged closure.
struct CustomTextField : View {
var placeHolderString : String
@Binding var contentString. : String
var body : some View {
TextField(placeHolderString, text: $contentString, onEditingChanged: { (editing) in
//Determin which TextField is currently active here
}, onCommit: {
}).textFieldStyle(RoundedBorderTextFieldStyle())
.multilineTextAlignment(.center)
}
}