[Dropdown] minCharacters for remote content #3886

Closed
periabyte opened this Issue Mar 30, 2016 · 1 comment

Projects

None yet

2 participants

@periabyte

Hi, I'm currently implementing a Dropdown with a remote content, however I noticed that dropdown doesn't have a minCharacters setting like Search, so once the dropdown is clicked, it immediately sends a query to the server with an empty search term. Here is my current settings for dropdown..

$('.ui.dropdown.search').dropdown({
            apiSettings: {
                url: url,
                onResponse: (response) => {
                    var results = $.map(response, (val, index) => {
                        return val;
                    });

                    var res = {
                        "success": results.length > 0,
                        "results": results
                    };
                    return res;
                }
            },
            fields: {
                value: value,
                name: name
            },
            onChange: function (value) {
                callback(value);
            }
        });
@jlukic jlukic added the Enhancement label Apr 4, 2016
@jlukic jlukic added this to the 2.1.9 milestone Apr 4, 2016
@jlukic
Member
jlukic commented Apr 4, 2016

Seems like a low hanging fruit

@jlukic jlukic added a commit that referenced this issue Apr 13, 2016
@jlukic jlukic Add #3886 min characters for dropdown 544b205
@jlukic jlukic closed this Apr 13, 2016
@jlukic jlukic added a commit that referenced this issue Apr 13, 2016
@jlukic jlukic #3886 fix default 4a8eef3
@jlukic jlukic modified the milestone: 2.1.9, 2.2 May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment