Property 'emptyFilter' does not exist on type 'Dropdown'.

UI Components for Angular
Post Reply
rajeev.tripathi
Posts: 6
Joined: 12 Jul 2021, 13:15

13 Jul 2021, 15:25

Hi,

I updated my Angular Project from v10 to v11 and like wise PrimeNG too.

Code: Select all

"primeicons": "^4.0.0",
"primeng": "^11.4.3",
Before upgrade, the dropdown component and builds were working fine. This is how the component signature was (It's wrapped under a shared component)

Code: Select all

<p-dropdown [options]="items" [(ngModel)]="selectedItem"
            [filter]="filterable" styleClass="p-dropdown"
            [virtualScroll]="virtualScroll" (onChange)="dropdownChange($event)"
            [disabled]="disabled" 
            [placeholder]="defaultText | transloco"
            dropdownIcon="fa fa-caret-down" [appendTo]="appendTo">
    <ng-template let-item pTemplate="selectedItem">
        <span>{{item.label | transloco}}</span>
    </ng-template>
    <ng-template let-itemObject pTemplate="item">
        <div class="ui-helper-clearfix">
            <div>{{itemObject.label | transloco}}</div>
        </div>
    </ng-template>
</p-dropdown>
After upgrade I am getting issues while building the project. I made below changes too (optionLabel and label), but with no luck. (I also tried removing the pTemplate)

Code: Select all

<p-dropdown [options]="items" [(ngModel)]="selectedItem"
            [filter]="filterable" styleClass="p-dropdown"
            [virtualScroll]="virtualScroll" (onChange)="dropdownChange($event)"
            [disabled]="disabled" 
            [placeholder]="defaultText | transloco"
            label="label"
            optionLabel="label"
            dropdownIcon="fa fa-caret-down" [appendTo]="appendTo">
    <ng-template let-item pTemplate="selectedItem">
        <span>{{item.label | transloco}}</span>
    </ng-template>
    <ng-template let-itemObject pTemplate="item">
        <div class="ui-helper-clearfix">
            <div>{{itemObject.label | transloco}}</div>
        </div>
    </ng-template>
</p-dropdown>
The build issue says -

Error: node_modules/primeng/dropdown/primeng-dropdown.d.ts.Dropdown.html(63,43): Property 'emptyFilter' does not exist on type 'Dropdown'.
node_modules/primeng/dropdown/primeng-dropdown.d.ts.Dropdown.html(69,43): Property 'empty' does not exist on type 'Dropdown'.


Any help is appreciated!

PhilHuhn
Posts: 177
Joined: 19 Sep 2018, 02:52
Location: Ann Arbor, Michigan USA
Contact:

15 Jul 2021, 18:35

Hey, I'm a fellow user of PrimeNG. label="label" doesn't exist.

Has the error message change since the upgrade?

I might delete the PrimeNG in the node_modules folder and reload them again. Maybe try an earlier version.

The source for V 12 is as follows. It looks like 'empty' was worked on in late April and early May:

https://github.com/primefaces/primeng/b ... ropdown.ts

rajeev.tripathi
Posts: 6
Joined: 12 Jul 2021, 13:15

16 Jul 2021, 11:37

Thanks for your reply. I have tried removing the "label" attribute and cleared node_modules and reinstalled 11.0.0 version. But no luck yet.

To give some more background here, I have created a wrapper component and using prime-ng dropdown inside it.

rajeev.tripathi
Posts: 6
Joined: 12 Jul 2021, 13:15

16 Jul 2021, 14:28

With older version i.e. 10.0.3 it is working fine.

PhilHuhn
Posts: 177
Joined: 19 Sep 2018, 02:52
Location: Ann Arbor, Michigan USA
Contact:

16 Jul 2021, 20:36

Hey:
I tried a V12 of PrimeNG, but my v11 demo was already broken from when I upgraded to to ES-Lint. As I see it, you can stick with V10 PrimeNG or register a bug request at:

https://github.com/primefaces/primeng/issues

Yeah V12 PrimeNG doesn't work in a V11 Angular project.

PhilHuhn
Posts: 177
Joined: 19 Sep 2018, 02:52
Location: Ann Arbor, Michigan USA
Contact:

19 Jul 2021, 15:04

Just released!

PrimeNG 11.4.4
Repository: primefaces/primeng · Tag: 11.4.4 · Commit: 7419dc6 · Released by: cagataycivici

rajeev.tripathi
Posts: 6
Joined: 12 Jul 2021, 13:15

26 Jul 2021, 18:17

Sorry for late reply. But I checked with 11.4.4 version as well. But no luck. Same issue comes up.

I think, I should log a bug on github.

Image

rajeev.tripathi
Posts: 6
Joined: 12 Jul 2021, 13:15

28 Jul 2021, 14:19

After some trials and deep look, this connects to TemplateError checking configuration for Angular 11. I have a created a github issue - https://github.com/primefaces/primeng/issues/10456

akshar
Posts: 1
Joined: 09 Nov 2022, 11:42

09 Nov 2022, 11:46

Hi,

Is this issue resolved? I am still facing this in Angular 11 and primeNG 11.4.5

node_modules/primeng/multiselect/primeng-multiselect.d.ts.MultiSelect.html(88,47): Property 'empty' does not exist on type 'MultiSelect'.
node_modules/primeng/dropdown/primeng-dropdown.d.ts.Dropdown.html(63,43): Property 'emptyFilter' does not exist on type 'Dropdown'.
node_modules/primeng/dropdown/primeng-dropdown.d.ts.Dropdown.html(69,43): Property 'empty' does not exist on type 'Dropdown'.
node_modules/primeng/listbox/primeng-listbox.d.ts.Listbox.html(48,35): Property 'emptyFilter' does not exist on type 'Listbox'.
node_modules/primeng/listbox/primeng-listbox.d.ts.Listbox.html(54,35): Property 'empty' does not exist on type 'Listbox'.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests