I can't find a way to use the plugin bootstrap-select inside a dropdown-menu.
The select just do not show.
I have added this jQuery not to close the dropdown-menu by clicking in it:
$(document).on("click", ".menuplus", function (e) {
e.stopPropagation();
});
And I don't think that it does not appear because of this stopPropagation
condition.
I did a jsfiddle with the minimum required, i feel like it's bootstrap-select plugin bug!
Any chance to make it work?
https://jsfiddle.net/d3yqo9wc/4/
It's all with the old version of Bootstrap 4 /jQuery 3.3.1 because the project on which we work on is it using it!
SOLUTION
Thanks to @Swati reply I could update the jsfiddle:
https://jsfiddle.net/jdtnsmwu/46/
How this could be better? :)
One way to solve this is to manually control the behaviour of dropdown menu. So, whenever menu is clicked add/remove class show from dropdown as well from dropdown-menu.
Also, now added some more code for manually closing the menu itself when click outside of the
dropdown-div
. You can add similar code for choose button to work.Demo Code :