I am migrating a module from primeng 7 to primeng11 along with angular11 the code runs perfectly fine on ng serve the functionalities are working too but on build I am getting a weird error
error TS2339: Property 'value' does not exist on type 'FilterMetadata | FilterMetadata[]'.
Property 'value' does not exist on type 'FilterMetadata'.
the error is for the below code
<input *ngIf='!col.noFilter' [style.width]="'98%'" [style.height]="'25px'" pInputText type="text"
[placeholder]="col.filterPlaceHolder ? col.filterPlaceHolder : ''"
(input)="dt.filter($event.target.value, col.field, col.filterMatchMode)"
[value]="dt.filters[col.field]?.value" />
I have verified the primeng FilterMetaData
interface and it has the property value like below
export interface FilterMetadata {
value?: any;
matchMode?: string;
operator?: string;
}
the code syntax is fine i have veriified the same on primeng page docuemntation https://www.primefaces.org/primeng/showcase/#/table
Please kindly help not sure why ng serve has no ssues but build is failing. My node version is node v10.23.0
question from:
https://stackoverflow.com/questions/65938954/property-value-does-not-exist-on-type-filtermetadata-on-primeng-table 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…