更改列标题高度 [英] Alter Column Header height
问题描述
我们正在使用 react-data-grid (引人注目),并希望对表格标题进行一些样式调整.
We are using react-data-grid (adazzle), and would like to do some styling adjustments to the table header.
我们希望调整标题,使它们大约是表中行高的两倍,如下所示:
We would like to adjust the headers so that they are about twice the hight of the rows in our table, like so :
我猜想我们将从HeaderRow组件中解决这个问题.但是,因为该组件的文档为零,所以我对如何进一步解决此问题一无所知.
I am guessing that we would approach this from the HeaderRow Component. However because there is zero documentation for this Component I have zero idea how to further approach this problem.
推荐答案
在某个论坛的某个地方找到了答案:
Buried in some forum somewhere I found the answer :
render() {
return (
<ReactDataGrid
onGridSort={this.handleGridSort}
columns={this._columns}
headerRowHeight={123}
rowGetter={this.rowGetter}
rowsCount={this.state.rows.length}
// rowRenderer={RowRenderer}
minHeight={500}/>);
}
有一个标志 headerRowHeight ,您可以将其设置为数值.
There is a flag headerRowHeight which you can set a numerical value to.
这篇关于更改列标题高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!