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

md-autocomplete error when using *ngIf in md-input-container #3269

Closed
Poledouris opened this issue Feb 23, 2017 · 1 comment · Fixed by #3274
Closed

md-autocomplete error when using *ngIf in md-input-container #3269

Poledouris opened this issue Feb 23, 2017 · 1 comment · Fixed by #3274
Assignees
Labels
P2 The issue is important to a large percentage of users, with a workaround

Comments

@Poledouris
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Drop down shows and no error is thrown

What is the current behavior?

Drop down is not shown, and an error is thrown in Chrome Dev Tools:

  • "Cannot read property 'toArray' of undefined"

What are the steps to reproduce?

Inside the md-input-container tag include an *ngIf directive
Plunker based off Material Example for Autocomplete:
https://plnkr.co/edit/AYx6dvqxMARf3WcgrX6x?p=preview

What is the use-case or motivation for changing an existing behavior?

It should work

Which versions of Angular, Material, OS, browsers are affected?

Angular 2.4.8, Material Beta 2

Is there anything else we should know?

I have found a couple workarounds, but neither are ideal:

  • put the *ngIf directive in a span around the md-input-control (shouldn't be necessary)
  • put the md-autocomplete into the md-input-container (if this is the proper solution, I think demos should be updated and implemented in this manner.)
@kara kara self-assigned this Feb 23, 2017
@kara kara added cannot reproduce The team is unable to reproduce this issue with the information provided P2 The issue is important to a large percentage of users, with a workaround and removed cannot reproduce The team is unable to reproduce this issue with the information provided labels Feb 23, 2017
@kara kara added the has pr label Feb 24, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants