Skip to content
This repository was archived by the owner on Jun 16, 2019. It is now read-only.
This repository was archived by the owner on Jun 16, 2019. It is now read-only.

[Bug] MdlSelectComponent. Error after view destroy #881

@ggalletty

Description

@ggalletty

There seems to be an error that verifies when view containing the component is instantiated, then destroyed and then reinstantiated again, for example with directive ngIf.

Console log

Error: ViewDestroyedError: Attempt to use a destroyed view: detectChanges at viewDestroyedError (vendor.bundle.js:9017) at Object.debugUpdateDirectives [as updateDirectives] (vendor.bundle.js:13162) at checkAndUpdateView (vendor.bundle.js:12503) at callWithDebugContext (vendor.bundle.js:13565) at Object.debugCheckAndUpdateView [as checkAndUpdateView] (vendor.bundle.js:13105) at ViewRef_.detectChanges (vendor.bundle.js:10577) at MdlSelectComponent.webpackJsonp.737.MdlSelectComponent.renderValue (0.chunk.js:5154) at MdlSelectComponent.webpackJsonp.737.MdlSelectComponent.writeValue (0.chunk.js:5228)

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions