From 1891ffa6e1c4db8bc0d0f60eca255895a6448bdd Mon Sep 17 00:00:00 2001 From: Pekka Hyvönen Date: Thu, 16 Feb 2017 10:14:38 +0200 Subject: Reduce ComboBox initial requests (#8571) * Reduce ComboBox initial requests Use initial fetched data on client side, do not request data from server side for each time popup is opened. Fixed initial filter being null for ComboBox on DataProvider, causing unnecessary size & fetch for not-changed filter. Fixed ComboBox sending default filter unnecessarily to server. Fixed wrong page indexing in VComboBox -> ComboBoxConnector. Fixes #8496 Fixes vaadin/framework8-issues#488 * Fix last item missing When pageLength was 0 and nullSelectionAllowed, the last item was not shown. Tried to sensify the API for total suggestions versus total suggestions + null selection item. * Fix ComboBox selected item updates Handles changing of ItemCaptionGenerator or ItemIconGenerator, need to update the selected item caption and icon separately. Previously it worked because all data was sent all the time to client. Doesn't fix the issue, when selected item is updated with refreshItem(), and it is not on the active range that will be sent to client. For that, ComboBox would need a separate notification about item update. * Updated screenshots --- .../src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'shared') diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java index a7be4865a7..666fff1e58 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java @@ -93,4 +93,11 @@ public class ComboBoxState extends AbstractSingleSelectState { */ public String emptySelectionCaption = ""; + /** + * Selected item icon uri. + * + * @since 8.0 + */ + public String selectedItemIcon; + } -- cgit v1.2.3