Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alter Column Header height

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 :

enter image description here

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.

like image 576
Oliver Watkins Avatar asked Aug 30 '26 02:08

Oliver Watkins


1 Answers

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}/>);
  }

There is a flag headerRowHeight which you can set a numerical value to.

EDIT:

Looks like the property is now columnHeaderHeight

e.g.,

<ReactDataGrid
  ...
  columnHeaderHeight={123} />
like image 198
Oliver Watkins Avatar answered Sep 03 '26 09:09

Oliver Watkins



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!