GWTBootstrap3.extras.select: How to add open/close handler for drop-down menu of the multiselect?

301 views Asked by At

In my case I need to do some actions just after closing drop-down menu, not on checking, since I use multiselect mode of the control.

1

There are 1 answers

0
Nikolay Shabak On

Here is the solution:

public class DropdownHideHandlingSelect extends Select {

    public DropdownHideHandlingSelect() {
        initHideDropdownHandler(this, getElement());
    }

    private void onHideDropdown() {
        GWT.log("dropdown was hidden");
    }

    private native void initHideDropdownHandler(ValueSelect select, Element e) /*-{
        $wnd.jQuery(e).on('hidden.bs.select', function (e) {
            [email protected]::onHideDropdown()();
    });
    }-*/;
}