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

[Bug] MdlSelectComponent. Error after view destroy #1801

Open
SridharSudharshan opened this issue Sep 27, 2019 · 1 comment
Open

[Bug] MdlSelectComponent. Error after view destroy #1801

SridharSudharshan opened this issue Sep 27, 2019 · 1 comment

Comments

@SridharSudharshan
Copy link

This seems to be the same as in this issue

Console log

Error: ViewDestroyedError: Attempt to use a destroyed view: detectChanges
    at viewDestroyedError (core.js:28817)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:45255)
    at checkAndUpdateView (core.js:44270)
    at callWithDebugContext (core.js:45631)
    at Object.debugCheckAndUpdateView [as checkAndUpdateView] (core.js:45193)
    at ViewRef_.detectChanges (core.js:31125)
    at MdlSelectComponent.renderValue (angular-mdl-select.js:680)
    at MdlSelectComponent.writeValue (angular-mdl-select.js:440)

Steps to reproduce

  1. Apply structural directive to MdlElement or its container
  2. Match conditions to destroy/init view
  3. Match conditions to init/destroy view

The issue verified both on reactive and template-driven forms

I've also tried applying this fix and it seems to work. Could you please take a look at this?

Thanks.

@SridharSudharshan
Copy link
Author

I have opened a stackoverflow question for the same.

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

1 participant