Skip to content

TreeSelect: #filtericon template is not applied #19316

@alinaalishandra

Description

@alinaalishandra

Describe the bug

The #filtericon template for TreeSelect component is not working as described in the official documentation. Despite providing a custom <ng-template #filtericon>, the default filter icon (pi pi-filter) is always rendered instead of the custom content.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/eswupexy?file=src%2Fapp%2Ftreeselect-basic-demo.ts

Environment

https://stackblitz.com/edit/eswupexy?file=src%2Fapp%2Ftreeselect-basic-demo.ts,package.json

Angular version

21

PrimeNG version

v21

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Create a p-treeSelect with [filter]="true".
Add a custom template:

<ng-template #filtericon>
  <span>Custom Filter Icon</span>
</ng-template>

Open the dropdown.
Observe that the default icon is shown, not the custom one.

Expected behavior

The content of #filtericon template should replace the default filter icon

The #closeicon template is also affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LTS-PORTABLEIssue's fix will be ported to supported LTS versionsType: BugIssue contains a bug related to a specific component. Something about the component is not working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions