'UI5 - How to Resize Table Height

​Hello,

It seems that table row height of UI5 Table is pretty big with lot of white space above and below the text.

enter image description here

Is there anyway I can resize the height of the row with lesser px? I want to apply this seeting only for this table and not all tables.

When I look at its CSS in Chrome Developer tools, I get following:

enter image description here

element.style{height: 49px} is the culprit. How can I make it like 30 px and can apply only to this table?

Thanks !



Solution 1:[1]

From the looks of it I believe you are using the sap.ui.table.Table. You can use the rowHeight property of the control to reduce the row height.

Solution 2:[2]

Try using sapUiSizeCompact style in your page or your table. You cannot set exact height with this one but it might be enough for your case.

class="sapUiSizeCompact"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Stephen S
Solution 2 Huseyin