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 thrown error when using with ngfor #5413

Closed
skyfremen opened this issue Jun 29, 2017 · 1 comment · Fixed by #5446
Closed

md-autocomplete thrown error when using with ngfor #5413

skyfremen opened this issue Jun 29, 2017 · 1 comment · Fixed by #5446
Assignees

Comments

@skyfremen
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Array should populate based on newly assign array after touching/selecting value from autocomplete

What is the current behavior?

Cannot reassign the array in ngfor after touch the autocomplete control but it working with md-input.

What are the steps to reproduce?

Step 1: Click on Input
Step 2 : Click on button "Click Me"
Expected behavior => No error and array using ngFor has been reassign
Actual behavior=> No error and array using ngFor has been reassign

Step 3: Touch/Select value from Autocomplete
Step 4: Click on button "Click Me"
Expected behavior=> No error and array using ngFor has been reassign
Actual behavior=> Error and array using ngFor not render (hang)

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://plnkr.co/edit/DaVDisXWMEFwUSF8RrV0?p=preview

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

NA

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

Material Beta 7

Is there anything else we should know?

NA

@crisbeto crisbeto self-assigned this Jun 30, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Jun 30, 2017
Fixes an error that was being thrown when attempting to close the panel of an autocomplete that is inside a destroyed view. The issue is that `closePanel` can end up getting called multiple times in a row, which leads to an attempt to call `detectChanges` on a destroyed `ChangeDetectorRef`.

Fixes angular#5413.
mmalerba pushed a commit that referenced this issue Jul 7, 2017
Fixes an error that was being thrown when attempting to close the panel of an autocomplete that is inside a destroyed view. The issue is that `closePanel` can end up getting called multiple times in a row, which leads to an attempt to call `detectChanges` on a destroyed `ChangeDetectorRef`.

Fixes #5413.
mmalerba pushed a commit that referenced this issue Jul 9, 2017
Fixes an error that was being thrown when attempting to close the panel of an autocomplete that is inside a destroyed view. The issue is that `closePanel` can end up getting called multiple times in a row, which leads to an attempt to call `detectChanges` on a destroyed `ChangeDetectorRef`.

Fixes #5413.
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants