MojtabaHs / iPhoneNumberField

Elegant SwiftUI phone number textField.
MIT License
542 stars 88 forks source link

Keyboard Forcus not working when Using onNumberChange, onEdit.... functions #108

Closed sachithamh closed 2 weeks ago

sachithamh commented 2 months ago

I tried different methods but not work for me

iPhoneNumberField(text:  $viewModel.contactNumber) 
       .flagHidden(false)
       .flagSelectable(true)
       .onEdit(perform: { value in
             DispatchQueue.main.async { // without main async same behaviur
                    viewModel.updateContactNumberValidity(isValid: value.isValidNumber)
              }
      })
     .focused($focusedField, equals: .contactNumber)
sachithamh commented 2 months ago

https://github.com/user-attachments/assets/8592ba32-d142-4478-8396-60ab991a0f4a

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.