primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Datatable: Header columns arrow style not working with onLazyLoad

Open igogu opened this issue 9 years ago • 2 comments

I am ordering from server with (onLazyLoad) events, but the style of the header is not working, image

<p-dataTable  #dataTable (onSort)="orderEvent($event.field,$event.order)" [style]="{'border':'5px solid black;'}" [value]="art | async" 
[rows]=[numFilasPagina] [paginator]="true" [globalFilter]="gb" sortMode="multiple" [responsive]="true" 
[editable]="true" [totalRecords]="recordsTotal" [lazy]="true" (onLazyLoad)="loadLazy($event,gb.value)" >
   
   <p-column [style]="{'width':'80px'}" field="codi" header="Codi" [sortable]="true" ></p-column>
   <p-column field="descripcio" header="descripcio" [sortable]="true" [editable]="true"></p-column>
   <p-column styleClass="col-button">
       
        <template let-car="rowData" pTemplate type="body">
        <button pButton type="button" (click)="deleteArticleGamma(car.codi)" label="Borrar"></button>
            <button type="button" pButton (click)="editArticleGamma(car.codi, car.descripcio)" icon="fa-pencil-square-o"></button>            
        </template>
    </p-column>
</p-dataTable>

The arrows does not refresh when you click on the header to order that column and does not change the color, so the style is not working.

If I just order without
[lazy]="true" (onLazyLoad)="loadLazy($event,gb.value)" the header arrows style is working right.

image

Any solution for this?

Thank you so much.

igogu avatar Dec 21 '16 10:12 igogu

The issue is reproduced for PrimeNG v1.1.4

gorokhmn avatar Feb 10 '17 15:02 gorokhmn

Unable to replicate, please provide a test case based on plunkr below and we'll review again.

http://plnkr.co/edit/Wj39h1?p=preview

cagataycivici avatar Jun 19 '17 10:06 cagataycivici