Skip to content

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

@Adam-Michalski

Description

@Adam-Michalski

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;
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions