Skip to content

skyhook-preview: binding style template via async pipe causes unnecessary change detection #592

Open
@lincolnthree

Description

@lincolnthree

<div class="firefox-bug" [ngStyle]="style$|async">

Recommend writing directly to the dom and calling change detection manually in or after hover callback:


  constructor(private skyhook: SkyhookDndService, private _el: ElementRef) {
    this.sub = this.style$.subscribe((style) => {
      requestAnimationFrame_or_equivalent(() => {
        this._el.nativeElement.style = `transform: ${style.transform}; display: ${style.display}`;
      });
    });
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions