Icon does not update
Closed this issue · 4 comments
pauldraper commented
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.
emanzuetaj commented
@pauldraper agreed, my workaround to this has been to use a timeout such as
this.hideIcon = true;
this.icon = 'heart';
setTimeout(() => {
this.hideIcon = false;
});
pauldraper commented
My workaround is
to change
<i-feather [name]="name"></i-feather>
to
<i-feather *ngFor="let n of [name]" [name]="n"></i-feather>
michaelbazos commented
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.
michaelbazos commented
Updated the demo to use the version with the fix:
https://stackblitz.com/edit/angular-feather?file=src%2Fapp%2Fapp.component.html