From 8fa5af24800ef9b3a86c37c923853ede06c3896e Mon Sep 17 00:00:00 2001 From: John <hy8246@gmail.com> Date: Fri, 6 Aug 2021 18:35:18 -0400 Subject: [PATCH] feat: implement clear all feature Close #75 --- .../flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java b/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java index 79832fb..1f94374 100644 --- a/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java +++ b/src/main/java/com/flowingcode/vaadin/addons/twincolgrid/TwinColGrid.java @@ -270,7 +270,11 @@ public void addRightGridClassName(String classname) { public void removeRightGridClassName(String classname) { getRightGrid().removeClassName(classname); } - + + public void clearAll() { + updateSelection(new HashSet<>(), new HashSet<>(right.getItems())); + } + private void setDataProvider(ListDataProvider<T> dataProvider) { leftGridDataProvider = dataProvider; getLeftGrid().setDataProvider(dataProvider);