javascript - Stop Angular UI bootstrap dropdown from closing in certain cases? -


i have dropdown contains tabs , buttons. want able click tabs without dropdown closing if click button close.

i used $event.stoppropagation() stop closing blocks buttons closing too.

is there way this?

by default dropdown automatically close if of elements clicked, can change behavior setting auto-close option follows:

always - (default) automatically closes dropdown when of elements clicked.

outsideclick - closes dropdown automatically when user clicks element outside dropdown.

disabled - disables auto close. can control open/close status of dropdown manually, using is-open. please notice dropdown still close if toggle clicked, esc key pressed or dropdown open.

here sample : plunker

    <div class="btn-group" dropdown auto-close="disabled">       <button type="button" class="btn btn-danger">action</button>       <button type="button" class="btn btn-danger dropdown-toggle" dropdown-toggle>         <span class="caret"></span>         <span class="sr-only">split button!</span>       </button>       <ul class="dropdown-menu" role="menu">         <li><a href="#">action</a></li>         <li><a href="#">another action</a></li>         <li><a href="#">something else here</a></li>         <li class="divider"></li>         <li><a href="#">separated link</a></li>       </ul>     </div> 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -