Fixed that text got updated during view update
This commit is contained in:
parent
5f97a21965
commit
2e62a23e63
|
@ -100,7 +100,9 @@ struct UIKitTextField: UIViewRepresentable {
|
|||
}
|
||||
|
||||
func textFieldDidChangeSelection(_ textField: UITextField) {
|
||||
text = textField.text ?? ""
|
||||
DispatchQueue.main.async { // to not update state during view update
|
||||
self.text = textField.text ?? ""
|
||||
}
|
||||
}
|
||||
|
||||
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
||||
|
|
Loading…
Reference in New Issue