mobven / CountryPicker

Country Picker with unicode flags and country codes.
MIT License
67 stars 19 forks source link

Fix index out of range bug #12 #13

Closed 10Macit closed 2 years ago

10Macit commented 2 years ago

When we call dismiss it calls textField's editingChanged when autosuggestions enabled. We have two option to fix this issue, i used second way because autosuggestion can be useful.

  1. Disabling autosuggestions
  2. Calling dismiss after using current filtered result
Rashidium commented 2 years ago

@10Macit thanks for the solution. though I think UITextFieldDelegate's shouldChangeCharacterInRange would be better solution for our case, as editingChanged event is based on touch events of the UITextField. Closing this pr to open a new one with a solution. I would appreciate if you can review. Cheers 🍻