Skip to content

Commit

Permalink
fix(primeng/p-tag): style binding not change dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
volvachev authored and Egor Volvachev committed Feb 23, 2023
1 parent fa4a718 commit c48eab5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/components/tag/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CommonModule } from '@angular/common';
@Component({
selector: 'p-tag',
template: `
<span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style">
<span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="tagStyle">
<ng-content></ng-content>
<span class="p-tag-icon" [ngClass]="icon" *ngIf="icon"></span>
<span class="p-tag-value">{{ value }}</span>
Expand All @@ -20,7 +20,7 @@ import { CommonModule } from '@angular/common';
export class Tag {
@Input() styleClass: string;

@Input() style: any;
@Input() tagStyle: any;

@Input() severity: string;

Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/components/tag/tagdemo.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h5>Properties</h5>
<td>Icon of the tag to display next to the value.</td>
</tr>
<tr>
<td>style</td>
<td>tagStyle</td>
<td>object</td>
<td>null</td>
<td>Inline style of the component.</td>
Expand Down

0 comments on commit c48eab5

Please sign in to comment.