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

Style not applied to element due to not detected changes #94

Open
Adam-Michalski opened this issue Feb 21, 2020 · 1 comment
Open

Style not applied to element due to not detected changes #94

Adam-Michalski opened this issue Feb 21, 2020 · 1 comment

Comments

@Adam-Michalski
Copy link

Adam-Michalski commented Feb 21, 2020

I am facing problem where svgStyle does not apply to element (sometimes) in cause of setSvg called after changes of name and no setStyle called from SvgIconComponent.

My case is that I am loading screen with empty icon status, then I update that status to proper icon. When I debug this code then everything goes fine until last step (everything is set as expected style is set before last step), the last step resets all svg elements to initial without setting style property.
Changes are reset in this.destroy() and in below code changes points to null

      const changes = this.differ.diff(this._svgStyle);
      console.log('differences', changes);

2

workaround for now is to set svg style manualy with ::ng-deep

  .status-new {
    color: #5f6c84;

    svg {
      width: 16px;
    }
  }
@czeckd
Copy link
Owner

czeckd commented Feb 25, 2020

@Adam-Michalski - Could you provide a small example of the typescript and html code to reproduce this?

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

No branches or pull requests

2 participants