Autocomplete
Text input with a panel of suggested options
Usage
Autocomplete is a text input with a panel of suggested options. When user change value of text input, panel with found options will be shown, so user can select one of the suggested options. Once user selected his option, it appears in text input.
Client-side implementation
This is the server-side (Java) API for Vaadin Platform for the vcf-autocomplete component. Looking for the client-side version? It can be found here: https://vaadin.com/directory/component/vaadin-component-factoryvcf-autocomplete
Sponsored development
Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: Support and Pricing
Sample code
H3 inputH3 = new H3("Current input: "); H3 selectionH3 = new H3("Selection: "); Autocomplete autocomplete = new Autocomplete(5); autocomplete.addChangeListener(event -> { String text = event.getValue(); autocomplete.setOptions(findOptions(text)); inputH3.setText("Current input: " + text); }); autocomplete.addAutocompleteValueAppliedListener(event -> { selectionH3.setText("Selection: " + event.getValue()); }); autocomplete.addValueClearListener(event -> { selectionH3.setText("Selection: " + ""); }); autocomplete.setLabel("Find what you want:"); autocomplete.setPlaceholder("search ...");
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Add support for Prefix and Suffix component to the input text field
- Released
- 2024-01-05
- Maturity
- BETA
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 24+
- Vaadin 23 in 23.0.0
- Vaadin 14 in 2.3.3
- Vaadin 13 in 1.2.0
- Vaadin 12 in 1.2.0
- Vaadin 11 in 1.2.0
- Vaadin 10 in 1.2.0
- Browser
- N/A
Autocomplete - Vaadin Add-on Directory
Text input with a panel of suggested optionsClient Side
View on GitHub
Autocomplete version 1.2.0
Updated client to vcf-autocomplete v1.2.0
Autocomplete version 2.0.0
### Version 2.0.0
- Updated to use P3 / npm version of the component for Vaadin 14 npm mode. Works in compatibility mode as well.
Autocomplete version 2.1.0
### Version 2.1.0
- Implemented HasSize
- Added setValue method
Autocomplete version 2.1.1
### Version 2.1.1
- Change item highlight to allow for any position sub string
Autocomplete version 2.1.2
### Version 2.1.2
- Allow controlling case sensitivity of the highlight
Autocomplete version 2.2.0
### Version 2.2.0
- Implement HasValue
Autocomplete version 2.2.1
### Version 2.2.1
- Fixed theme attribute propagation issue
Autocomplete version 2.3.0
### Version 2.3.0
- Added Focusable and HasValidation interfaces and their methods
Autocomplete version 2.3.1
### Version 2.3.1
- Re-released with Apache 2 license
- Works only on npm mode
Autocomplete version 2.3.2
Remove the CVAL license in the header and pom.xml.
Add a lumo import in the webcomponent to avoid a javascript error
Autocomplete version 23.0.0
Update the webcomponent and bump the vaadin version to 23
Autocomplete version 2.3.3
### Version 2.3.3
- Fixes compatibility with Vaadin 14.9
Autocomplete version 24.1.3
Replaced Polymer by Lit
Autocomplete version 24.1.4
Fixed initial value and readonly issues
Autocomplete version 24.1.5
Fixed readonly and disabled states
Autocomplete version 24.1.6
Added partnames to the inner components
Autocomplete version 24.1.7
Add support for Prefix and Suffix component to the input text field