tl221
tl221

Reputation: 39

Resize column headers in Angular ag-grid on sort

When I click on my header row to sort a column, it adds an up/down arrow to the header, to the right of my header text. This is making the header text truncate.

Is there a way to have the header width autosize to accommodate the up/down arrow added when sorting?

Before clicking header to sort, the header text is "Date Updated" After clicking header to sort, the header text becomes truncated to just "Date"

Upvotes: 0

Views: 966

Answers (1)

Sanjay Choudhary
Sanjay Choudhary

Reputation: 349

Give a fixed width to column so it can accommodate both text and arrow icon -

{ headerName: 'Col C', field: 'c', width: 100, editable: false, filter: 'agTextColumnFilter' }

Upvotes: 1

Related Questions