Skip to content

[Dropdown] minCharacters for remote content #3886

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

[Dropdown] minCharacters for remote content #3886

periabyte opened this issue Mar 30, 2016 · 1 comment
Milestone

Comments

@periabyte
Copy link

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 this to the 2.1.9 milestone Apr 4, 2016
@jlukic
Copy link
Member

jlukic commented Apr 4, 2016

Seems like a low hanging fruit

jlukic added a commit that referenced this issue Apr 13, 2016
@jlukic jlukic closed this as completed Apr 13, 2016
jlukic added a commit that referenced this issue Apr 13, 2016
@jlukic jlukic modified the milestones: 2.1.9, 2.2 May 1, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants