Property 'value' does not exist on type 'FilterMetadata' on primeng table
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
from Recent Questions - Stack Overflow https://ift.tt/2L1BSyx
https://ift.tt/eA8V8J
Comments
Post a Comment