[FEATURE-16567] Perspective Table Row Height

What’s the proper way to set the row height in a Perspective table?
I have tried:
Rows > style > maxHeight:15
Rows > style > height:!5
without any success.

1 Like

If you add a “fontSize” property to the style for the table it will adjust the font size for the table. This will automatically change row widths.

ex. fontSize:20px

If you don’t put the “px” it will highlight red but still work.

Edit: I should have said you want to add fontSize to the style for the Rows. That’s rows.style.fontSize. You can add this property using the style editor.

Don’t know if it’s proper, but cells.style.height seems to work.

Try adding “minHeight” instead of “maxHeight” to the row styles and set it to something like 50.

Sorry, just realized you were trying to make it shorter than the default height…looks like maybe font size takes precedent. Definitely some weird behavior with maxHeight <20.

It seems the rows have a minHeight of 30px. If you try setting the height or minHeight of the cells to something less than 30, it will be capped to 30px.
Is this something we can get around?

Has anyone found a way around this?

You can’t, at least not easily. This was intentional. It’s there as a row virtualization measurement calculation optimization. We can look at again to see if it’s feasible.

1 Like

We had to find a workaround to meet a customer requirement (we needed to show 5 rows and column headers within a 100px space).
The way we’ve gotten around this is by:

  1. Create an xy container, and put the table into it
  2. Manually added a style property called zoom to the xy container, with a value of 0.5 (zooms out)
  3. Then we adjusted the font sizes of the cells and columns.

However, this method has a few downsides:

  1. Works fine on Chrome, but Safari has several issues (column headers don’t line up with cells)
  2. The sort arrows are much smaller
  3. And other issues (mainly occurring when virtualization mode was enabled)
1 Like