juanjotorres90 / ngx-material-intl-tel-input

Introducing an Angular library designed to streamline the input and validation of international telephone numbers.
https://www.npmjs.com/package/ngx-material-intl-tel-input
MIT License
9 stars 3 forks source link

flag disappears when we enter initial value (angular 18) #16

Closed nouaim closed 3 weeks ago

nouaim commented 3 weeks ago

Screenshot from 2024-08-21 11-27-30

<form [formGroup]="formGroup">
  <ngx-material-intl-tel-input
    [fieldControl]="control"
    [required]="true"
    [autoIpLookup]="false"
    [numberValidation]="false"
    [disabled]="true"
    [iconMakeCall]="false"
    autoSelectedCountry="ae"
    [hidePhoneIcon]="true"
    [includeDialCode]="false"
    [emojiFlags]="true"
    initialValue="55554444"
  >
  </ngx-material-intl-tel-input>
</form>

However when we remove it :

<form [formGroup]="formGroup">
  <ngx-material-intl-tel-input
    [fieldControl]="control"
    [required]="true"
    [autoIpLookup]="false"
    [numberValidation]="false"
    [disabled]="true"
    [iconMakeCall]="false"
    autoSelectedCountry="ae"
    [hidePhoneIcon]="true"
    [includeDialCode]="false"
    [emojiFlags]="true"
  >
  </ngx-material-intl-tel-input>
</form>

Screenshot from 2024-08-21 11-28-52

can we have the flag all the time?

The problem persists even after adding necessary theme styles

Screenshot from 2024-08-21 12-41-43

nouaim commented 3 weeks ago

it works well sorry. i've just put single quotes inside the double quotes [initialValue]="'+91 80900 00120'" and made sure code number is present