From ded683a75f5923274952a0a173ca09b61c834c82 Mon Sep 17 00:00:00 2001 From: Pekka Hyvönen Date: Thu, 18 May 2017 15:48:02 +0300 Subject: Add shorthand for adding a column with ComponentRenderer --- documentation/components/components-grid.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'documentation/components') 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); ---- -- cgit v1.2.3