Property 'value' does not exist on type 'FilterMetadata[]'

UI Components for Angular
Post Reply
hepple
Posts: 1
Joined: 27 Mar 2019, 12:14

21 Nov 2020, 13:57

Hi,

I've upgraded from v10 to v11 but I'm getting a strange error. HTML that previously worked now gives this error...

Property 'value' does not exist on type 'FilterMetadata[]'

This is the HTML code

<th>
<p-multiSelect appendTo='body' [ngModel]="dtGovernorAppointments.filters['governor.displayName']? dtGovernorAppointments.filters['governor.displayName'].value: []" [style]="{'width':'100%'}" [options]="siAppointmentsGovernors" defaultLabel="All" (onChange)="dtGovernorAppointments.filter($event.value, 'governor.displayName', 'in')" ></p-multiSelect>
</th>

I can see the 'value' property on the filter, so no idea why this is happening.

This is the table definition...

<p-table #dtGovernorAppointments [columns]="appointmentCols" [contextMenu]="cmAppointments" [value]="governingBodyChildrenViewModel.governorAppointments" styleClass="p-datatable-striped" sortMode="multiple" selectionMode="single" [scrollable]="true" scrollHeight="flex" [scrollHeight]="'calc(100vh - 404px)'" >

rakeshhatwar
Posts: 1
Joined: 25 Nov 2020, 13:56

25 Nov 2020, 14:03

While I searching for the same issue. I figured this out, Try this answer maybe it would help you as well. Don't put the [value] property. I removed it and worked properly for me.

Sampathl
Posts: 3
Joined: 21 Jun 2021, 15:11

01 Jul 2021, 22:26

This works for me:

Code: Select all

 <input pInputText type="text" (input)="dt.filter($any($event.target)?.value, 'name', 'contains')"
 [value]="$any(dt.filters['name'])?.value" placeholder="Search by Name" class="p-column-filter">
Ref: https://stackoverflow.com/a/68216513/1077309

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests