From 22d7071a3da1b0cd503a41a5860f9d132c5a8c59 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Fri, 5 Feb 2016 17:44:19 +0200 Subject: [PATCH] Fix ListDataSource implementation firing empty remove events Change-Id: I43e0149ddc11aa05b33b299465eb4dbce83ec534 --- .../vaadin/client/widget/grid/datasources/ListDataSource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/com/vaadin/client/widget/grid/datasources/ListDataSource.java b/client/src/com/vaadin/client/widget/grid/datasources/ListDataSource.java index cf7ec53e68..a2bebbe784 100644 --- a/client/src/com/vaadin/client/widget/grid/datasources/ListDataSource.java +++ b/client/src/com/vaadin/client/widget/grid/datasources/ListDataSource.java @@ -236,7 +236,7 @@ public class ListDataSource implements DataSource { public void clear() { int size = ds.size(); ds.clear(); - if (changeHandler != null) { + if (changeHandler != null && size > 0) { changeHandler.dataRemoved(0, size); } } -- 2.39.5