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

Component: Table, when I try add a custom icon doesn't work #16068

Closed
jadir-junior opened this issue Jul 19, 2024 · 1 comment
Closed

Component: Table, when I try add a custom icon doesn't work #16068

jadir-junior opened this issue Jul 19, 2024 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@jadir-junior
Copy link

Describe the bug

This is my html and I have notice, when I put one ng-template within another, doesn't works

<ng-template pTemplate="header">
    <tr>
      <th style="width: 4rem">
        <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
      </th>
      <th pSortableColumn="name" style="width: 20%">
        <div class="flex items-center">
          <span>Nome</span>
          <!-- <i class="material-icons-outlined p-sortable-column-icon">sort</i> -->
          <ng-template
            pTemplate="sorticon"
            field="name"
            let-sortOrder="sortOrder"
          >
            <div *ngIf="sortOrder === 0">
              <!-- Nenhuma ordenação -->
              <i class="material-icons-outlined p-sortable-column-icon">sort</i>
            </div>
            <div *ngIf="sortOrder === 1">
              <!-- Ordenação ascendente -->
              <i class="material-icons-outlined p-sortable-column-icon"
                >arrow_upward</i
              >
            </div>
            <div *ngIf="sortOrder === -1">
              <!-- Ordenação descendente -->
              <i class="material-icons-outlined p-sortable-column-icon"
                >arrow_downward</i
              >
            </div>
          </ng-template>
        </div>
      </th>
      <th>Status</th>
      <th>Perfil</th>
      <th>E-mail</th>
      <th>Alterado em</th>
      <th>Ações</th>
    </tr>
  </ng-template>

I notice within ngAfterContentInit, it aren't in that.

error-2
errro-1

if I move it to the top of the pTemplete header it appears

Environment

Windows 11

Reproducer

No response

Angular version

18.0.0

PrimeNG version

17.18.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.14.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@jadir-junior jadir-junior added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 19, 2024
@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants