summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnastasia Smirnova <anasmi@utu.fi>2018-04-20 10:00:57 +0300
committerIlia Motornyi <elmot@vaadin.com>2018-04-20 10:00:57 +0300
commit629f2ddccf337a11460e2c861249351c263fb9ae (patch)
tree168bd533409082dc070f2ddc631a894e3f8a91c2
parent3ffb27fa734195f103fdbfb5ad6c81d7a8b006f7 (diff)
downloadvaadin-framework-629f2ddccf337a11460e2c861249351c263fb9ae.tar.gz
vaadin-framework-629f2ddccf337a11460e2c861249351c263fb9ae.zip
Update example for Comparator in Grid (#10833)
Fixes #10337
-rw-r--r--documentation/datamodel/datamodel-providers.asciidoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/documentation/datamodel/datamodel-providers.asciidoc b/documentation/datamodel/datamodel-providers.asciidoc
index 9b3c4dadd0..e4e16df24f 100644
--- a/documentation/datamodel/datamodel-providers.asciidoc
+++ b/documentation/datamodel/datamodel-providers.asciidoc
@@ -58,10 +58,10 @@ We can also define a custom [classname]#Comparator# if we want to customize the
[source, java]
----
-grid.addColumn("Name", Person::getName)
+grid.addColumn(Person::getName).setCaption("Name")
// Override default natural sorting
- .setComparator(Comparator.comparing(
- person -> person.getName().toLowerCase()));
+ .setComparator(
+ Comparator.comparing(Person::getName)::compare);
----
[NOTE]