简体   繁体   中英

How to fit large text in AG-Grid Header?

I set .ag-header-cell-label.ag-header-cell-text {white-space:break-spaces;important;} in order to see the full text when width is not enough.But when text is very long like below

headerName: 'Age of Athlete and asdadfsdf fgdsfgdsfg sdfgsdfgsdfg',

在此处输入图像描述

you can see that it doesn't fit.I increased the height of row but nothing changed.How can I fit long text doesnt matter how much long it is?

Plunker: https://plnkr.co/edit/UtfwvTOhpRDivBu5

You can add like this headerHeight: 150 inside gridOptions to increase the header height if the header text is too long. Because adding this line .ag-header-cell-label.ag-header-cell-text {white-space:break-spaces;important;} you will only get the text in multiple lines with the previous height. Try it and if it won't work comment here again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM