aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/components/components-grid.asciidoc
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-03-29 11:18:07 +0300
committerPekka Hyvönen <pekka@vaadin.com>2017-03-29 11:18:07 +0300
commitf9a9f2c4be0e38d936acab88cba45799fa83ff4a (patch)
tree59d2d5bbeb39ce2c942981c112e9a4bd3c6fed8d /documentation/components/components-grid.asciidoc
parent92ccddf4f2465dae1f43e6087ca25ae41cae637d (diff)
downloadvaadin-framework-f9a9f2c4be0e38d936acab88cba45799fa83ff4a.tar.gz
vaadin-framework-f9a9f2c4be0e38d936acab88cba45799fa83ff4a.zip
Add Grid.setRowHeight() (#8935)
Fixes #8667
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