mobven / CountryPicker

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

Index out of range when I select country from search result #15

Closed emoonadev closed 2 years ago

emoonadev commented 2 years ago

Hi,

Screen Shot 2022-08-09 at 16 38 07

Rashidium commented 2 years ago

please mention the version you are using

Rashidium commented 2 years ago

this should be fixed on the latest version 1.0.4

emoonadev commented 2 years ago

Not fixed on 1.0.4

Rashidium commented 2 years ago

would you please describe how the scenario is? i would appreciate if you can specify what's the ui framework used, swiftui or uikit?

emoonadev commented 2 years ago

I use UIKIT, when I start seach for "unit" and select united state the crash occur See below gif (After clicked on the cell the app crash). I opened pull request that fix this crash ezgif-3-66ab79c1a7

Rashidium commented 2 years ago

interesting. i was sure fixed it with 1.0.4. let me check and get you back.

Rashidium commented 2 years ago

hello @emoonadev . I've checked in the sample app of 1.0.4 and I couldn't reproduce the crash. Can you double check whether your version is 1.0.4? You can see the version you're using in file inspector of the xcode where SPM package versions are visible. It should contain CountryPicker (1.0.4).

emoonadev commented 2 years ago

Yes the version is 1.0.4

Rashidium commented 2 years ago

Yes I could reproduce it. It's strange that on dismiss ui text field updates suggestion. I thought this is only behavior of UITextField.onEditingChanged. But somehow its same for shouldChangeCharactersIn. I'm merging your PR with tag 1.0.5. Thanks for contribution @emoonadev 🍻