diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java b/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java index 7cfaf7572e..1386005351 100644 --- a/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java +++ b/client/src/main/java/com/vaadin/client/ui/VRadioButtonGroup.java @@ -227,9 +227,13 @@ public class VRadioButtonGroup extends FocusableFlowPanelComposite } public void selectItemKey(String selectedItemKey) { - RadioButton radioButton = keyToOptions.get(selectedItemKey); - if (radioButton != null) {// Items might not be loaded yet - radioButton.setValue(true); + if (selectedItemKey != null) { + RadioButton radioButton = keyToOptions.get(selectedItemKey); + if (radioButton != null) { // Items might not be loaded yet + radioButton.setValue(true); + } + } else { + keyToOptions.values().forEach(button -> button.setValue(false)); } } } |