intl-tel-input icon indicating copy to clipboard operation
intl-tel-input copied to clipboard

Search Country enabled when separateDialCode = true

Open Korsario23 opened this issue 1 year ago • 9 comments

Plugin version

e.g. v24.3.3 (please try latest version)

Steps to reproduce

  1. Choose countrySearch: false,
  2. separateDialCode: true,

Expected behaviour

Country search textbox hidden

Actual behaviour

Country search textbox shows

Initialisation options

countrySearch: false, 
onlyCountries: ["mx","us","ca","cn","jp","fr", "de","gb", "es", "it", "ch", "nl", "ar","co","br","pe"],
countryOrder: ["mx","us","ca"],
initialCountry: "mx",
strictMode: true,
separateDialCode: true,
utilsScript: "https://cdn.jsdelivr.net/npm/[email protected]/build/js/utils.js?1724446080851"

Korsario23 avatar Aug 24 '24 02:08 Korsario23

Other test, After you call iti.setNumber(mobileStr) textbox country search shows again...

Korsario23 avatar Aug 24 '24 03:08 Korsario23

Re: the main issue you raised - if you're using separateDialCode then I would strongly recommend leaving countrySearch enabled, as they work well together - see the readme on separateDialCode for more information.

Can I ask why you want to disable countrySearch? What is your use case? Why do you think that gives users a better experience?

With that said, I have just released v24.3.4 which now supports having separateDialCode=true and countrySearch=false if that's what you really want.

After you call iti.setNumber(mobileStr) textbox country search shows again...

What do you mean by "shows again"? I thought it was already showing and that was the problem?

jackocnr avatar Aug 24 '24 07:08 jackocnr

Hi, Thank you for your reply. Of course, I let you know this case. I enabled 3 countries (CAN, USA, MEX), so countrySearch is not convenient to show (as I think). But it is mandatory for my case to get the country code (separateDialCode).

I really, really appreciate and thank you for this release v24.3.4 :)

Korsario23 avatar Aug 24 '24 18:08 Korsario23

I tried to support your work ($$$) but system declines my ccard. Any ideas ?

Screenshot 000196

Korsario23 avatar Aug 24 '24 18:08 Korsario23

I tried to support your work ($$$) but system declines my ccard. Any ideas ?

That's kind of you. You can also try my Paypal link if you like: https://paypal.me/jackoconnor

jackocnr avatar Aug 24 '24 19:08 jackocnr

Definitely I'm doing wrong. example 1 example 2

Korsario23 avatar Aug 24 '24 19:08 Korsario23

Have you definitely updated to the latest version?

You can play with this codepen to try it out.

jackocnr avatar Aug 24 '24 19:08 jackocnr

Yes, I did it. The problem was when you set value to the control, it re-initializes. Anyway, Than you very much. Excellent work!!!

Korsario23 avatar Aug 24 '24 22:08 Korsario23

The problem was when you set value to the control, it re-initializes

I don't understand this bit. Are you still seeing this problem? Can you explain in more detail? Can you provide more example code to reproduce the issue?

Are you using the JavaScript plugin, or the React component?

jackocnr avatar Aug 25 '24 09:08 jackocnr

Closing due to inactivity.

jackocnr avatar Sep 01 '24 06:09 jackocnr