If you have a dropdown with setting on: "click", adding class search to it prevents the dropdown from opening on click.
@jukestar it is suppose to work like that. Adding the search class to the drop down, turns the drop down to a search box, but values of drop down can still be accessed by clicking on the drop down icon.
@pranav-kural ok. Is there any way to make clicking on the search, to open the dropdown?
Try this
$('.ui.dropdown').on("click", function(){
$this = $(this).dropdown("show")
})
@jukestar @dhvsandeep that code should be able to open the dropdown on click. But however, if you want it work like a normal dropdown, and close on the second (or alternative) click, you would do something like this:
$('.ui.dropdown').on('click', function() {
var clicked = $(this).data('clicked');
$(this).dropdown((clicked === undefined || !clicked) ? "show" : "hide");
$(this).data("clicked", !clicked);
});
That will also help in not affecting the normal working of any other drop down you might be using. (like the second one in the jsfiddle)
jsfiddle: https://jsfiddle.net/2ujuymmo/4/
@jukestar
Please use the Gitter chatroom, the official forums or StackOverflow to ask usage questions; see the contributing guidelines for more information on what kind of posts should find themselves into the GitHub Issues board.