Wesley Laurence
Wesley Laurence

Reputation: 31

Remove sortable icon from PrimeReact datatable header

I used PrimeReact to create a datatable with sortable columns. I imported primeflex for conditional color on some of the cells, but now I am getting these big arrow icons on all my sortable columns and I want to remove them.

Here is a screenshot of the icon I am seeing: columns screenshot

How do I remove the arrow icons on all columns while still maintaining sortable functionality?

Upvotes: 1

Views: 500

Answers (1)

Melloware
Melloware

Reputation: 12039

Its easy just set display:none on the icons like this CSS

body .p-datatable .p-sortable-column .p-sortable-column-icon {
    display: none;
}

Upvotes: 0

Related Questions