Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Open Typeahead suggestion on click #190

Open
eliovir opened this issue Jun 22, 2015 · 0 comments
Open

Open Typeahead suggestion on click #190

eliovir opened this issue Jun 22, 2015 · 0 comments
Milestone

Comments

@eliovir
Copy link

eliovir commented Jun 22, 2015

Hi!

I need to open suggestions when user clicks in the textbox. I did not find this in the current API.

According to typeahead.js API, there is a way to open and close suggestions.

I'm not sure how to implement this.

I tried to add in src/main/java/org/gwtbootstrap3/extras/typeahead/client/ui/Typeahead.java, the following methods, but I failed.

    public void close() {
        close(getElement());
    }

    private native void close(Element e) /*-{
        $wnd.jQuery(e).typeahead('close');
    }-*/;

    public void open() {
        open(getElement());
    }

    private native void open(Element e) /*-{
        $wnd.jQuery(e).typeahead('open');
    }-*/;

PS: thanks @Dw9 for this useful plugin to GWTBootstrap3.

@sjardine sjardine modified the milestone: 1.0 Nov 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants