You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say you set (either on device or simulator) the flag for chile (using the figer taps, not programatically) and then you type in your number. It's perfect. Now let's say you go back and return to this screen, only this time the request provides you a phone number so you call the preFillText function which calls the setcode, set flag functions and sets the text property. Within both the setflag and setcode functions there are calls for formatting the phone number in accordance to your custom formats (which is not the case here) or to the current country based on the nkv source you pass in using the country code. The sources, the country codes, numbers and all of them are correct but upon "formatting" the number the phone number gets changed and is being added the last 3 chars again in the end of the number. So if the phone number is this (for chile for example): 56 9 2522 5421 then the prefilltext function will mess up with this number and in the end you will see displayed in the phone field this: 56 9 2522 5421421.
I managed to overcome this by setting the current country initially to false, setting the text property of the field as is from the response and by manually setting the phonePicker.flagView.flagButton.setImage using the UIImage constructor with the bundle. What would be nice is if we could get acces to the NKVSourcesHelper struct so we can use the static functions from there but i got the job done.
What did you expect to happen?
I expected the phone number to not get any other chars added to it, cause that's not ok at all.
Please provide a boolean so we can set it to false and if that's false then by calling preFillText it won't call the enablePhoneFormat within it and also it won't call the by callin the setFlag function it won't call the textField.presenter.enablePhoneFormat function within it.
Please provide access so we can at least call the NKVSourcesHelper struct and just get the flag(for: source) result.
The text was updated successfully, but these errors were encountered:
General Information
NKVPhonePicker Version:2.1.0
iOS Version(s):14.0
Swift Version:5.3
Device or Simulator:both and no all models
Did you check an example: yes
What happened?
Let's say you set (either on device or simulator) the flag for chile (using the figer taps, not programatically) and then you type in your number. It's perfect. Now let's say you go back and return to this screen, only this time the request provides you a phone number so you call the preFillText function which calls the setcode, set flag functions and sets the text property. Within both the setflag and setcode functions there are calls for formatting the phone number in accordance to your custom formats (which is not the case here) or to the current country based on the nkv source you pass in using the country code. The sources, the country codes, numbers and all of them are correct but upon "formatting" the number the phone number gets changed and is being added the last 3 chars again in the end of the number. So if the phone number is this (for chile for example): 56 9 2522 5421 then the prefilltext function will mess up with this number and in the end you will see displayed in the phone field this: 56 9 2522 5421421.
I managed to overcome this by setting the current country initially to false, setting the text property of the field as is from the response and by manually setting the phonePicker.flagView.flagButton.setImage using the UIImage constructor with the bundle. What would be nice is if we could get acces to the NKVSourcesHelper struct so we can use the static functions from there but i got the job done.
What did you expect to happen?
I expected the phone number to not get any other chars added to it, cause that's not ok at all.
Please provide a boolean so we can set it to false and if that's false then by calling preFillText it won't call the enablePhoneFormat within it and also it won't call the by callin the setFlag function it won't call the textField.presenter.enablePhoneFormat function within it.
Please provide access so we can at least call the NKVSourcesHelper struct and just get the flag(for: source) result.
The text was updated successfully, but these errors were encountered: