Dynamically setting height props

Tags: #<Tag:0x00007efc64dd4b10> #<Tag:0x00007efc64dd4930>

Hello,

I’m working with multiple tables and large datasets, and I’m utilizing the height and viewportRowRenderingOffset properties. For each table, I need to dynamically render the number of rows based on user input.

I’d like to know the best approach to adjust the height and viewportRowRenderingOffset dynamically, according to the number of rows. If these values are set too low or too high, it could cause UI issues, such as excessive empty space below each table when there are fewer rows.

Best regards,

Hi @hanq11

If you enable the AutoRowSize, you can read the heights of rows dynamically. You need to

  • enable AutoRowSize plugin
  • read the getColumnHeaderHeight from the plugin
  • read the rows heights via getRowHeight
  • set up 23px height for rows without defined height (default value that we have).

Here’s a demo https://jsfiddle.net/8as0me1o/.