dh-select

Dropdown with search


Keywords
amd, select
License
MIT
Install
bower install dh-select

Documentation

Dropdown menu with search

Instalation

bower install dh-select

Using

require(['dh-select'], function (DhSelect) {
    var categorySelect;

    categorySelect = new DhSelect(
        $('#category'),
        categoriesData,
        {
            name: 'category'
        }
    );
    categorySelect.setValue(currentValue);
});

where categoriesData is array with objects:

{
    value: 1;   
    title: 'title', // text that will be shown as menu item
    childs: [...]   // optional, array of same objects
}

or just use global constructor DhSelect