We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The type of the geoIpLookup is incorrectly defined in IntTelInput.d.ts
It should be defined as a function taking callback as an argument: geoIpLookup?: (callback: (countryCode: string) => void) => void
This can be seen in the documentation and code too:
It is incorrectly defined as: geoIpLookup?: (countryCode: string) => void
This causes typescript error when providing geoIpLookup:
Only needed slight change in the type as suggested above
Code:
<IntlTelInput preferredCountries={['ae', 'pk']} geoIpLookup={async function (cb) { const info = await getIpInfo() // calling the ipinfo.io api const countryCode = info && info.country ? info.country : 'pk' cb(countryCode) }} formatOnInit={false} format={false} />
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The type of the geoIpLookup is incorrectly defined in IntTelInput.d.ts
Expected Behavior
It should be defined as a function taking callback as an argument:
geoIpLookup?: (callback: (countryCode: string) => void) => void
This can be seen in the documentation and code too:
Current Behavior
It is incorrectly defined as:
geoIpLookup?: (countryCode: string) => void
This causes typescript error when providing geoIpLookup:
Possible Solution
Only needed slight change in the type as suggested above
Steps to Reproduce
Code:
Environment
v6.1.0
all
The text was updated successfully, but these errors were encountered: