Skip to content

Commit

Permalink
Update PhoneNumberTextField.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfrancmartin authored Jul 22, 2024
1 parent 6695bee commit 30304e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PhoneNumberKit/UI/PhoneNumberTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ open class PhoneNumberTextField: UITextField, UITextFieldDelegate {
}

open func textFieldDidBeginEditing(_ textField: UITextField) {
if self.withExamplePlaceholder, self.withPrefix, self.withPrefixPrefill, let countryCode = phoneNumberKit.countryCode(for: currentRegion)?.description, (text ?? "").isEmpty {
if self.withExamplePlaceholder, self.withPrefixPrefill, self.withPrefix, let countryCode = phoneNumberKit.countryCode(for: currentRegion)?.description, (text ?? "").isEmpty {
text = "+" + countryCode + " "
}
self._delegate?.textFieldDidBeginEditing?(textField)
Expand Down

0 comments on commit 30304e6

Please sign in to comment.