Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New line in header

Tags:

ag-grid

How to add new line to header text? I tried below solution, but this will just word wrap the text. What I need to do is to force the new line

.ag-header-cell-label {
    text-overflow: clip;
    overflow: visible;
    white-space: normal;
}

And in my html, I added

[headerHeight]="48"
like image 431
iPhoneJavaDev Avatar asked Dec 12 '18 01:12

iPhoneJavaDev


1 Answers

What i have tried and works Perfect is

.ag-header-cell-label .ag-header-cell-text {
   white-space: pre-wrap !important;
}

And Header

headerName: "Model \n test", 

\n for new line and white-space: pre-wrap !important; to preserve Line Break.

Here is the example https://jsfiddle.net/a6Lp5e9k/

like image 141
Ravi Avatar answered Dec 09 '22 14:12

Ravi