aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/components/components-grid.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/components/components-grid.asciidoc')
-rw-r--r--documentation/components/components-grid.asciidoc6
1 files changed, 5 insertions, 1 deletions
diff --git a/documentation/components/components-grid.asciidoc b/documentation/components/components-grid.asciidoc
index 223be80e6f..f903a962bd 100644
--- a/documentation/components/components-grid.asciidoc
+++ b/documentation/components/components-grid.asciidoc
@@ -518,7 +518,9 @@ must be between 0.0 and 1.0.
[classname]#ComponentRenderer#:: Renders a Vaadin [classname]#Component# in a column. Since components
are quite complex, the [classname]#ComponentRenderer# comes with possible performance issues.
-To use it efficiently you should use as few nested components as possible.
+To use it efficiently you should use as few nested components as possible. If the components used are
+of a different size than the default row height, [methodname]#Grid.setRowHeight()# can be used to adjust
+the height of all rows in the Grid.
+
Use [classname]#Button# in [classname]#Grid#:
@@ -530,6 +532,8 @@ grid.addColumn(person -> {
Notification.show("Clicked: " + person.toString()));
return button;
}, new ComponentRenderer());
+// make sure the buttons fit in the cells of the Grid
+grid.setRowHeight(40);
----
Components will occasionally be generated again during runtime. If you have a state in your