【发布时间】:2017-09-07 20:54:40
【问题描述】:
我有一个 react-virtualized Table 带有一些冗长的列标题,并且希望列标题换行而不是用省略号拖尾。有谁知道如何做到这一点?
作为参考,这里有一些示例代码:
makeTable = <AutoSizer>
{({ width, height }) => (
<Table ref={this.setTableRef.bind(this)}
width={width}
height={height}
headerHeight={20}
rowHeight={this._rowHeight.bind(this)}
rowCount={this.props.reportRows.length}
rowGetter={this._rowGetter.bind(this)}
rowClassName={this._rowClassName.bind(this)}
>
<Column
label='Super Long Column Header Name of Longness'
dataKey='testCase'
width={150}
flexGrow={1}
cellRenderer={this._testCaseCellRenderer.bind(this)}
/>
[truncated the code above]
如您所见,我需要包装的是 label,但我应用的任何样式都不起作用,无论是在 Column 还是 css 中。帮助?谢谢!
【问题讨论】: