[英]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',
你可以看到它不適合。我增加了行的高度但沒有任何改變。我怎樣才能適合長文本不管它有多長?
如果 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.