diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2017-03-28 13:29:37 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-03-28 14:29:37 +0300 |
commit | cda2f0e5b244b6955372e9f459671fd4cd9db590 (patch) | |
tree | 364ac70763289bd896913f60686ee8e34cadaad8 /client | |
parent | 91590e9f6c91de1fcfd9534263a2e270d973d384 (diff) | |
download | vaadin-framework-cda2f0e5b244b6955372e9f459671fd4cd9db590.tar.gz vaadin-framework-cda2f0e5b244b6955372e9f459671fd4cd9db590.zip |
Fix NativeSelect inner component size (#8737)
Fixes #8702
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VNativeSelect.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java b/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java index 0ff6fe01f2..e39f25f0d8 100644 --- a/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java +++ b/client/src/main/java/com/vaadin/client/ui/VNativeSelect.java @@ -77,4 +77,28 @@ public class VNativeSelect extends FocusableFlowPanelComposite public ListBox getListBox() { return listBox; } + + @Override + public void setWidth(String width) { + if ("".equals(width)) { + // undefined width + getListBox().setWidth(""); + } else { + // fill the composite + getListBox().setWidth("100%"); + } + super.setWidth(width); + } + + @Override + public void setHeight(String height) { + if ("".equals(height)) { + // undefined height + getListBox().setHeight(""); + } else { + // fill the composite + getListBox().setHeight("100%"); + } + super.setHeight(height); + } } |