Skip to content
New issue

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

[showCallingCode] binding is not working #81

Closed
elonaire opened this issue Sep 2, 2021 · 2 comments
Closed

[showCallingCode] binding is not working #81

elonaire opened this issue Sep 2, 2021 · 2 comments
Assignees

Comments

@elonaire
Copy link

elonaire commented Sep 2, 2021

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@elonaire elonaire changed the title [showCallingCode] binding not working [showCallingCode] binding is not working Sep 2, 2021
@Rogermax
Copy link
Contributor

Rogermax commented Sep 3, 2021

In the commit "example demo showCallingCode" of the PR #80 I made a demo changing the [showCallingCode] binding and it's working. Maybe you are passing a string instead of a boolean?

If you're using a mat-select for example the value returned by the select is a string not a boolean. So it could be done this way:

TS

  showCallingCode = 'false';

HTML

        <div>
            <mat-form-field appearance="fill">
                <mat-label>Choose showCallingCode</mat-label>
                <mat-select [(value)]="showCallingCode">
                    <mat-option value="true">true</mat-option>
                    <mat-option value="false">false</mat-option>
                </mat-select>
            </mat-form-field>
        </div>
        <mat-select-country appearance="outline"
                            label="Country"
                            [language]="languageSelected"
                            [autocomplete]="'no'"
                            [showCallingCode]="showCallingCode == 'true'"
                            (onCountrySelected)="onCountrySelected($event)">
        </mat-select-country>

@AnthonyNahas AnthonyNahas self-assigned this Sep 3, 2021
@AnthonyNahas
Copy link
Member

#80 is already merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants