'How do I dynamically reflect the country code & flag on UI in vue-tel-input
I'm receiving the country code from the back-end and want to show the same in the vue-tel-input form.
I'm using the below code, but its not working as expected.
<vue-tel-input
:defaultCountry="defaultCountryCode"
:dropdownOptions="{showFlags:true,showDialCodeInSelection:true}"
@country-changed="setCountryCode"
></vue-tel-input>
for props refer: https://iamstevendao.github.io/vue-tel-input/documentation/props.html
Solution 1:[1]
I realize I'm late here but this should fix it:
:key="defaultCountryCode"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ironclock |