diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2015-07-09 13:27:49 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-07-16 06:40:11 +0000 |
commit | 546616b0667441997f5537c175c281e5f841effb (patch) | |
tree | 9ce266e44f0a4f9fdac1e420abdf38312e111588 /client | |
parent | 4c25c54d43a79a4c7d9ce315dd8d59c82d3a0ec2 (diff) | |
download | vaadin-framework-546616b0667441997f5537c175c281e5f841effb.tar.gz vaadin-framework-546616b0667441997f5537c175c281e5f841effb.zip |
Select last item only if filtered items exist. (#18441)
Change-Id: I1b601f7bcddd3a62edcd97651a3270b79dacc7fd
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VFilterSelect.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index 7951759fa2..1e474d3a1f 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -417,7 +417,9 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, selectPrevPage(); } else { - selectItem(menu.getItems().get(menu.getItems().size() - 1)); + if(!menu.getItems().isEmpty()) { + selectLastItem(); + } } } |