簡體   English   中英

如何在 AG-Grid Header 中適合大文本?

[英]How to fit large text in AG-Grid Header?

我設置.ag-header-cell-label.ag-header-cell-text {white-space:break-spaces;important;}以便在寬度不夠時查看全文。但是當文本很長時以下

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

在此處輸入圖像描述

你可以看到它不適合。我增加了行的高度但沒有任何改變。我怎樣才能適合長文本不管它有多長?

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

如果 header 文本太長,您可以像這樣在gridOptions中添加headerHeight: 150以增加 header 高度。 因為添加這一行.ag-header-cell-label.ag-header-cell-text {white-space:break-spaces;important;}您只會獲得具有先前高度的多行文本。 試試看,如果它不起作用,請再次在這里評論。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM