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
First off, I want to say thank you for creating intl-tel-input—it’s been incredibly helpful, and I appreciate all the effort that has gone into maintaining this repository!
I’m currently using the intl-tel-input React component and trying to implement auto-placeholder functionality based on the selected country. However, I’ve run into an issue where the placeholder always remains set to the U.S. format, regardless of the selected country.
To ensure utils.js is loaded, I have this useEffect:
useEffect(()=>{constloadUtils=async()=>{try{awaitimport("intl-tel-input/build/js/utils.js");console.log("Loaded utils.js");}catch(error){console.error("Failed to load utils.js:",error);}};loadUtils();},[]);
Despite this setup, the placeholder text doesn’t update when the country changes—it remains in the U.S. format. I could continue troubleshooting, but I figured it would be best to ask the experts who built it!
Is there anything I might be missing to enable auto-placeholder updates properly?
Thanks in advance for your time and help! I appreciate it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
First off, I want to say thank you for creating
intl-tel-input
—it’s been incredibly helpful, and I appreciate all the effort that has gone into maintaining this repository!I’m currently using the
intl-tel-input
React component and trying to implement auto-placeholder functionality based on the selected country. However, I’ve run into an issue where the placeholder always remains set to the U.S. format, regardless of the selected country.Here’s my component implementation:
To ensure utils.js is loaded, I have this
useEffect
:And here’s my
handleCountryChange
function:Related imports are the following:
Despite this setup, the placeholder text doesn’t update when the country changes—it remains in the U.S. format. I could continue troubleshooting, but I figured it would be best to ask the experts who built it!
Is there anything I might be missing to enable auto-placeholder updates properly?
Thanks in advance for your time and help! I appreciate it.
Beta Was this translation helpful? Give feedback.
All reactions