davidstutz / bootstrap-multiselect

JQuery multiselect plugin based on Twitter Bootstrap.
https://davidstutz.github.io/bootstrap-multiselect/
Other
3.67k stars 1.98k forks source link

Adding a custom div with controls on the multiselect list #758

Open AlwaysVbNet opened 8 years ago

AlwaysVbNet commented 8 years ago

I am adding a custom div as an item on the list. Inside that div I have a button for now but I'm planning to add a textbox so I can create items on the list. The problem is that when I click on the button or inside a custom textbox the list closes. How can I keep it open after a user clicks on each custom added control? The behavior should be the same as the 'search' button. Any ideas?

 $('#btn').click(function () {

            var val = " <li class='multiselect4-item multiselect-filter' value='0'><div class='input-group'><button class='btn btn-default dropdown-toggle' type='button' id='dropdownMenu1' data-toggle='dropdown' aria-haspopup='true' aria-expanded='true'></div></li>";

            $('.dropdown-menu').append(val);
davidstutz commented 7 years ago

I dind't try that before. maybe I'll do an experiment. But it seems that you are trying to open/close some other dropdown with that button right? Did you try adding a simple button without any functionality first?