We'd like to have a proper suggest item widget. The closest we came to is using a ComboBoxItem withouth pick list icon that completes on tab. This widget is attached to a data source.
However, since the value map i.e. the pick list is potentially really large we require the user to enter a number of chars before suggesting values. The following code ensures that the pick list is only displayed after the minimum number of required characters was entered.
BUT this has no impact on the requests that are being issued against the data source. Hence, if 'minChars' is 3 there are still DS requests against the server even if only a single char was entered.
Is there a way to suppress this?
However, since the value map i.e. the pick list is potentially really large we require the user to enter a number of chars before suggesting values. The following code ensures that the pick list is only displayed after the minimum number of required characters was entered.
Code:
addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { if (getValueAsString() != null) { setShowPickListOnKeypress(getValueAsString().length() >= minChars); } } });
Is there a way to suppress this?
Comment