diff options
author | Anastasia Smirnova <anasmi@utu.fi> | 2019-04-04 14:45:38 +0300 |
---|---|---|
committer | Sun Zhe <31067185+ZheSun88@users.noreply.github.com> | 2019-04-04 14:45:38 +0300 |
commit | 64d5b3af3d117cc8871d07fddf375118fefd5bbc (patch) | |
tree | e7d696c3521b0f8c9ecba43f7c0d7c84c44f8423 /server | |
parent | 049e6f39aadab1785d78bceaac575d25ea56dad4 (diff) | |
download | vaadin-framework-64d5b3af3d117cc8871d07fddf375118fefd5bbc.tar.gz vaadin-framework-64d5b3af3d117cc8871d07fddf375118fefd5bbc.zip |
Reset selection on DataProvider change in RadioButtonGroup (#11526)
* Reset selection on DataProvider change in RadioButtonGroup
Fixes #11454
Other components needing the same fix are ListSelect,NativeSelect,Combobox (The ones implementing HasDataProvider and extending AbstractSingleSelect. Grid is not affected as it extends AbstractListing and hadles selection differently)
* Added test case
Verify that ValueChangeListener is actually fired after value is reset setting new DataProvider
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/RadioButtonGroup.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java b/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java index 649c35d736..c234d6cfb5 100644 --- a/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java +++ b/server/src/main/java/com/vaadin/ui/RadioButtonGroup.java @@ -321,6 +321,7 @@ public class RadioButtonGroup<T> extends AbstractSingleSelect<T> @Override public void setDataProvider(DataProvider<T, ?> dataProvider) { + setSelectedItem(null); internalSetDataProvider(dataProvider); } } |