Primeng: Cannot find a differ supporting object when using [style]

Created on 8 Jul 2016  路  2Comments  路  Source: primefaces/primeng

The problem occurs when attempting to use [style] inside dynamic p-column elements after upgrade to latest and binding to one of the column array properties:

works fine:

<p-column *ngFor="let col of structure" [style] = "{'width':'50px'}" [field]="col.field" [header]="col.header" [editable]="false">

while

 <p-column *ngFor="let col of structure" [style] = "col.width" [field]="col.field" [header]="col.header" [editable]="false">

causes

Cannot find a differ supporting object '{'width':'50px'}'

Most helpful comment

Further investigation led to a very basic cause of the problem: entries were save as string, not as object.

All 2 comments

Further investigation led to a very basic cause of the problem: entries were save as string, not as object.

Thanks TekSiDoT.

Was this page helpful?
0 / 5 - 0 ratings