Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table: Not able to provide custom Icons for column filter clear icon #14397

Closed
Rahulvr7 opened this issue Dec 19, 2023 · 0 comments
Closed

Table: Not able to provide custom Icons for column filter clear icon #14397

Rahulvr7 opened this issue Dec 19, 2023 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Rahulvr7
Copy link

Rahulvr7 commented Dec 19, 2023

Describe the bug

Not able to provide custom Icon for table column filter and clear filter icon. It's not mentioned in the documentation as well.
This is the template for the filter clear icon from the official source code in file table.ts:

<button #icon *ngIf="showClearButton && display === 'row'" [ngClass]="{ 'p-hidden-space': !hasRowFilter() }" type="button" class="p-column-filter-clear-button p-link" (click)="clearFilter()" [attr.aria-label]="clearButtonLabel">
                <FilterSlashIcon *ngIf="!clearIconTemplate" />
                <ng-template *ngTemplateOutlet="clearFilterIcon"></ng-template>
            </button>

Couldn't find any reference for clearIconTemplate nor clearFilterIcon through which users could provide custom icon template.

Environment

Using Primeng version 17.0.1 and Angular 17.0.6

Reproducer

No response

Angular version

17.0.6

PrimeNG version

17.0.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.17.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Use primeng table with column filters enabled.
  2. Provide a ng-template inside p-column-filter for clear filter icon.

Expected behavior

The primeng FilterSlashIcon is replaced with custom icon defined in template.

@Rahulvr7 Rahulvr7 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 19, 2023
@Rahulvr7 Rahulvr7 changed the title Component: Table Table: Not able to provide custom Icons for column filter clear icon Dec 19, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 20, 2023
@cetincakiroglu cetincakiroglu added this to the 17.1.1 milestone Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants