diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2018-03-08 14:04:54 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-03-08 14:04:54 +0200 |
commit | ead24c18282f793231c4ef5015851731693153a8 (patch) | |
tree | 80b7000a61d6df473a9c13797c6e508cd989525b /client | |
parent | 9c54c201a3baa215857c97394c3d331b0cd7e993 (diff) | |
download | vaadin-framework-ead24c18282f793231c4ef5015851731693153a8.tar.gz vaadin-framework-ead24c18282f793231c4ef5015851731693153a8.zip |
Clear VComboBox selection fields when updated on server (#10692)
Fixes #10660
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java index 544f041770..21b4c0b02f 100644 --- a/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -126,6 +126,10 @@ public class ComboBoxConnector extends AbstractListingConnector @OnStateChange({ "selectedItemKey", "selectedItemCaption", "selectedItemIcon" }) private void onSelectionChange() { + if (getWidget().selectedOptionKey != getState().selectedItemKey) { + getWidget().selectedOptionKey = null; + getWidget().currentSuggestion = null; + } getDataReceivedHandler().updateSelectionFromServer( getState().selectedItemKey, getState().selectedItemCaption, getState().selectedItemIcon); |