diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2017-05-18 15:48:02 +0300 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2017-05-19 11:21:33 +0300 |
commit | ded683a75f5923274952a0a173ca09b61c834c82 (patch) | |
tree | 9f146d2ee294b04c1accee53a4764a5bb3c4ef37 /documentation/components | |
parent | 84c0bee7e90091b2b86c6c452d1bd87a27d98c7d (diff) | |
download | vaadin-framework-ded683a75f5923274952a0a173ca09b61c834c82.tar.gz vaadin-framework-ded683a75f5923274952a0a173ca09b61c834c82.zip |
Add shorthand for adding a column with ComponentRenderer
Diffstat (limited to 'documentation/components')
-rw-r--r-- | documentation/components/components-grid.asciidoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/documentation/components/components-grid.asciidoc b/documentation/components/components-grid.asciidoc index 1195a1c79a..160b97f077 100644 --- a/documentation/components/components-grid.asciidoc +++ b/documentation/components/components-grid.asciidoc @@ -576,12 +576,12 @@ the height of all rows in the Grid. Use [classname]#Button# in [classname]#Grid#: + ---- -grid.addColumn(person -> { +grid.addComponentColumn(person -> { Button button = new Button("Click me!"); button.addClickListener(click -> Notification.show("Clicked: " + person.toString())); return button; -}, new ComponentRenderer()); +}); // make sure the buttons fit in the cells of the Grid grid.setRowHeight(40); ---- |