Coder Social home page Coder Social logo

wbadam / searchbox Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 99 KB

Search box component for Vaadin 8

Home Page: https://vaadin.com/directory#!addon/searchbox

Java 98.06% CSS 1.94%
autocomplete autocomplete-search search suggestion vaadin vaadin-addon vaadin8

searchbox's People

Contributors

wbadam avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

searchbox's Issues

Images with com.vaadin.ui.Image

The code samples show Images. These images are referenced by external links.

Could you please provide a mechanism to use Images with Vaadins com.vaadin.ui.Image component?

Thanks

Suggestion method is not called

Hi,

The SearchBox is not calling the suggestion method this::suggestEmployees in the code below.

SearchBox searchBox = new SearchBox(VaadinIcons.SEARCH, ButtonPosition.RIGHT); searchBox.setSearchMode(SearchMode.EAGER); searchBox.setPlaceholder("type employee name..."); searchBox.setButtonJoined(false); searchBox.setSuggestionGenerator(this::suggestEmployees);

Thanks
-Saad

SearchEvent.getSelectedItem() returns an Optional that contains a new Optional

For some reason the getSelectedItem() returned Optional does not contain the Selected Item but a new Optional so One have to have some really dirty code like:

Object object = event.getSelectedItem().orElse(null);
if (object != null) {
MyObject as = ((Optional) object).orElse(null);
System.out.printLn(as.getName());
}
This must be a bug...

Only 5 suggestions show in dropdown

Probably I am missing something obvious, but in my example (which closely follows your your example) only the first 5 items ever appear in the search box dropdown with no way of scrolling to the next 5 (my searches sometimes return up to 100 matches). How do I change the limit or make sure that the user is able to scroll through multiple pages in the dropdown (just like in a "regular" vaadin ComboBox)?

Vaadin 8.6.0 support

It seems that .setButtonJoined(true) and usage of the ENTER key is not working anymore: button is kept outside of the textfield and pressing ENTER does nothing.

I'm using SearchBox 0.1.3 and Vaadin 8.6.0

Scroll through the list by holding down the arrow keys

I would very much like that it would be possible to scroll through the list of results by keeping the arrow-down key down. As of know you have to release the arrow-down key and press it again to scroll down to the next element the list. The regular comboboxes in Vaadin work this way.

If you need to go down the list a bit it would be nicer to just hold down the arrow-down key.

This behaviour also shows in the online demo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.