diff options
author | Denis <denis@vaadin.com> | 2017-01-27 15:44:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 15:44:03 +0200 |
commit | 9ef479303bb514622ef90d95b94d912780c1812d (patch) | |
tree | fd6929a4b396cb6b1ff290ded4e129cd60415d60 /shared/src | |
parent | 5616216306a138b3437d188e4b2df8253590abf5 (diff) | |
download | vaadin-framework-9ef479303bb514622ef90d95b94d912780c1812d.tar.gz vaadin-framework-9ef479303bb514622ef90d95b94d912780c1812d.zip |
Introduce empty selection functionality for NativeSelect. (#8336)
* Introduce empty selection functionality for NativeSelect.
Fixes vaadin/framework8-issues#545
Diffstat (limited to 'shared/src')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/nativeselect/NativeSelectState.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/nativeselect/NativeSelectState.java b/shared/src/main/java/com/vaadin/shared/ui/nativeselect/NativeSelectState.java index e4ff336e4d..c33cc66f82 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/nativeselect/NativeSelectState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/nativeselect/NativeSelectState.java @@ -31,6 +31,18 @@ public class NativeSelectState extends AbstractSingleSelectState { */ public static final String STYLE_NAME = "v-select"; + /** + * True to allow selecting nothing (a special empty selection item is shown + * at the beginning of the list), false not to allow empty selection by the + * user. + */ + public boolean emptySelectionAllowed = true; + + /** + * Caption for item which represents empty selection. + */ + public String emptySelectionCaption = ""; + { primaryStyleName = STYLE_NAME; } |