michaelbazos/angular-feather

Icon does not update

Closed this issue · 4 comments

When the name input changes, the icon does not update.

I imagine(?) this was the reason for going from <i-heart></i-heart> to <i-feather [name]="'heart'"></i-feather>, but it doesn't work.

@pauldraper agreed, my workaround to this has been to use a timeout such as

      this.hideIcon = true;
      this.icon = 'heart';
      setTimeout(() => {
        this.hideIcon = false;
      });

My workaround is

to change

<i-feather [name]="name"></i-feather>

to

<i-feather *ngFor="let n of [name]" [name]="n"></i-feather>

Thank you for the report & suggested workarounds @pauldraper and @emanzuetaj

I was able to reproduce the issue and push a fix.

It should work without workaround in version 6.0.2.