Creating two columns in angular -ui-bootstrap

I have about 13 items on my list, so I would like my dropdown menu in ui-bootstrap to have at least two columns. Right now, here is my html for the button:

<div class="btn-group" uib-dropdown keyboard-nav>
  <button id="simple-btn-keyboard-nav" type="button" class="btn btn-primary" uib-dropdown-toggle>
            Graph By Indications<span class="caret"></span>
  </button>
    <ul uib-dropdown-menu role="menu" aria-labelledby="simple-btn-keyboard-nav">
      <li class="nav-item" ng-repeat="item in test2" ng-click="fullIndicationFunction(item)"><a href="#">{{item}}</a></li>
    </ul>
    <ul uib-dropdown-menu role="menu" aria-labelledby="simple-btn-keyboard-nav">
      <li class="nav-item" ng-repeat="item in test1" ng-click="fullIndicationFunction(item)"><a href="#">{{item}}</a></li>
    </ul>
</div>

Right now, I end up in separate columns on top of each other, and I'm trying to get them next to each other. I tried wrapping the tags <ul>with <div class="row">...</div>, but that just stops the dropdown.

Here is what the code above produces:

enter image description here

+4
source share
1 answer

<ul> <li> <row>, , .

<div class="btn-group" uib-dropdown uib-keyboard-nav style="border-bottom: #357ebd 3px solid; border-radius: 10px">
          <button class="btn btn-primary" ng-click="clearVals()">Clear</button>
          <button type="button" class="btn btn-primary">
            {{ displayedIndication }}
              </button>
          <button  type="button" class="btn btn-primary" uib-dropdown-toggle>
            <span class="caret"></span>
          </button>
              <ul uib-dropdown-menu role="menu" aria-labelledby="simple-btn-keyboard-nav" style="margin-right:-120px">
                <div class="row" style="padding-left:7px; padding-right:7px">
                  <div class="col-sm-6" style="padding-left:-7px">
                    <li class="nav-item" ng-repeat="item in indList" ng-click="fullIndicationFunction(item)"><a href="#">{{item}}</a></li>
                  </div>
                  <div class="col-sm-6">
                    <li class="nav-item" ng-repeat="item in indList2" ng-click="fullIndicationFunction(item)"><a href="#">{{item}}</a></li>
                  </div>
                </div>
              </ul>
            </div>

, , , , . :

The study of molecular entities

+1

Source: https://habr.com/ru/post/1625905/


All Articles