3

I would like to display more than one row in my headers.

enter image description here

Previously I was able to change the header height.

Now I want to display multi line text, preferably passed in as an array.

The closest I have come to is digging through some forums and coming across a HeaderRenderer, which can be added to my columns like so :

    this._columns.push({ 
      key: 'key_empty_' + i,
      name: "asdfasdfasdf ",
      headerRenderer: HeaderRenderer,

    }) 

As far as I can see the HeaderRenderer just takes in a column and this column can then be manipulated.

In order to solve my problem one of these solutions should suffice :

  • have the ability to add a component into the Header object
  • Have an option to add multi line text into the header
  • Allow the code to interpret line breaks. ie. If I currently add "asdfasdf<br>asdfasdf" then it just displays as is.
Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225

1 Answers1

1

I created my own fix for this. I forked the react-data-grid project and updated the column renderer :

https://github.com/oliverwatkins/react-data-grid

Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225